5
All of my machines are Macs (Mac Pro, MacBook Pro, MacBook Air and Mac Mini (and Apple TV 2.0 too! :) ) but for my day-job, I develop .NET/WPF applications. Normally I just boot into Boot Camp and develop that way, which of course works great, but there are times when I need to simultaneously get to things on my Mac-side of the equation, so I've bought both VMware 3.1 and Parallels 6. Both work, however, even on my Mac Pro where I paid to upgrade to the better video cards (the NVidia 8600s I think vs. the stock ATI cards) the WPF performance bites!!
Now this confuses me since both boast that they support not only hardware-accelerated OpenGL 2.1, but also hardware-accelerated DirectX 9 (VMware even allegedly supports DirectX 10!) via their respective virtual drivers and both can run 3D games just fine, even in a window. But even the simple act of resizing a WPF window that has a tiled background results in some HIDEOUS repainting and resizing behaviors. It's damn near closer to what you'd expect over RDP let alone a software-only renderer (forget accelerated hardware completely!)
So... can anyone please tell me WTF WPF is doing differently? More importantly, how can I speed up the WPF performance? Should I switch to VirtualBox that also has support for DirectX? Or am I just gonna have to 'byte' the bullet (sorry... had to. So I like puns! Thank Jon Stewart!) and continue using Boot Camp?
1Try using VirtualBox and see what the performance is like. – Rafe Kettler – 2011-04-01T04:37:41.250
4WPF uses DirectX, as such it needs hardware acceleration for the best performance which VMs don't commonly support or virtualize. – BoltClock – 2011-04-01T04:55:41.667
Anyway, just use Boot Camp. I've never been a big fan of virtualizing an OS in a different OS. – BoltClock – 2011-04-01T04:57:37.610
I always have problems with WPF performance in virtual machines when trying to do fancy effects. And that is running dual core i7, 8gb memory and 120GB SSD using VirtualBox. – None – 2011-04-01T05:19:28.850
@BoltClock, As I said above, and as is heavily advertised by both VMware and Parallels, they do support DirectX. And if I were just going to use Boot Camp, I wouldn't have asked the question. As I said, I need to use OS X stuff at the same time. – Mark A. Donohoe – 2011-04-01T06:21:59.597
@Dave, good to know. Now I don't have to waste time setting up VirtualBox. I just don't get why if they all support DirectX, they don't work? ...or does WPF need DX10 or later? (I know VM and P support DX9. Don't know which VBox uses.) – Mark A. Donohoe – 2011-04-01T06:23:00.173
WPF will work without DirectX; it uses a fallback mechanism to adapt to the configuration of the current system. But the point is that you don't want to do WPF development without DirectX support. The ideal solution is to use Boot Camp, but the obvious disadvantage is you can't run Mac OS X apps at the same time. So pick between VMware and Parallels; either are solid candidates. You can find reviews and comparisons elsewhere online; that's off-topic for this site.
– Cody Gray – 2011-04-01T08:16:29.720@Cody, I know WPF will work without DirectX. That's not what I asked. I'm trying to find good performance, not just 'can it be done.' As I also said above, I already have the latest versions of both VMware and Parallels, and both have bad WPF performance even for the simplest of things. That's why I posted this question. I'm wondering if there are any settings/tweaks I can make, or perhaps another VM solution altogether that works better than those because using Boot Camp has not been a smooth experience considering how much back-and-forth I have to do boot-wise. – Mark A. Donohoe – 2011-04-01T17:33:17.710
Unfortunately, no. There isn't any button or switch for this. Emulation isn't perfect, and Windows keeps changing all the rules. Most emulators and even virtualization software doesn't support Aero Glass yet. There's a big reason I haven't migrated to WPF. It's incredible how much smoother redraw, resize, and other animation is in OS X compared to Windows. A vintage 2000 Blue & White G3 on OS X runs circles around my Windows machine from a couple of years ago, and I say that as a Windows developer. I wish there was such a simple switch! – Cody Gray – 2011-04-02T06:30:47.230
@studiohack, you edited my question to change the case of 'MacBook' to have the 'b' in lowercase which is incorrect (look at the front of the units) so I changed them back. – Mark A. Donohoe – 2011-05-25T05:05:04.690
FWIW, Virtualbox supports DirectX - it just says "experimental" next to the checkbox. – Alain Pannetier – 2011-05-25T05:17:10.937
And, have you find a solution for this problem? I'm facing the same issue here... – rdkleine – 2012-02-01T14:12:44.667
I abandoned it for now. Couldn't get anything to work well enough in a VM, which really is surprising considering I can practically get Portal 2 to run in a VM just fine, but I can't smoothly animate a damn rectangle from one side of a blank window to the other. I love programming WPF, but damn, didn't they really hose the implementation. Javascript animations in a VM performs better than this! – Mark A. Donohoe – 2012-02-01T19:15:30.873