What is the best VM for developing WPF apps from within OS X?

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?

Mark A. Donohoe

Posted 2011-04-01T04:36:19.350

Reputation: 651

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

Answers

1

I know for a fact VMWare has certain extensions, or drivers, that you can install to increase performance; try those. As an extensive user of VMs myself, their performance can't match native speeds; just get used to it. I tried programming in VMs, then I got sick of it and got another computer, one for Windows, one for Linux.

Alec

Posted 2011-04-01T04:36:19.350

Reputation: 1 379

I believe you're referring to the drivers for the VM. That's true of any modern VM. What I don't get is 3D apps run just fine using those drivers, but simple WPF apps perform extremely choppy. I'm starting to find it's more MS's horrible implementation of WPF rendering more so than the client or drivers its running on. The WPF Deep Dive article shows just what a mess it actually is. – Mark A. Donohoe – 2012-01-16T05:54:42.587

1As much as I hate to say this, the best solution is to get a computer with windows on it. Otherwise, if you can RDP into your box at work, that would be another fantastic solution. – Alec – 2012-01-16T13:42:05.703

RDP's performance is atrocious with WPF. And while it would be great to get another machine, I'm asking what's the best virtual solution (i.e. product and settings) since that's what I have to work with. Thanks though. – Mark A. Donohoe – 2012-01-16T15:07:46.427

Unfortunately, I think you're just gonna have to continue using Boot Camp – Alec – 2012-01-19T15:40:30.847

Boot Camp isn't an option as I need to be booted into the Mac at the same time, hence the posting here about a VM. Thanks anyway. – Mark A. Donohoe – 2012-01-21T00:19:32.693

0

Try this !!

Install and play any one of the latest PC games (Call of duty, NFS, etc) on your VM, since almost all PC games makes use of DirectX. These games are the perfect test for your hardware and underlying software as-well.

If the game play experience was not good, then there should be some problem with VMWare/hardware. If not, then it might likely to be problem with WPF itself. I remember reading somewhere that WPF is having few known performance issue under Citrix environment. hence there is chance that the problem you are facing might be related to that as well.

Karthik

Posted 2011-04-01T04:36:19.350

Reputation: 101

@PrinceCoder, I don't have any PC-games that I can install since I'm not a gamer. BUT... this is an 8-core Mac Pro with 16GB of RAM and 2 higher-end NVidia cards (much better performance than the stock ATIs) and everything is (or was when I bought this 2 yrs back) top of the line. When I'm booted in Boot Camp, it's smooth as glass even on quad monitors. The Mac side too is smooth as glass... except for Windows running in a VM. I have the latest VMware and Parallels drivers to so I know it's not that either. Not sure what it is, but it seems I'm not alone in having this issue and it bites. – Mark A. Donohoe – 2011-04-01T17:37:16.850

1@MarqueIV Some recent(ish) games, e.g. America's Army, are free. – Daniel Beck – 2011-05-25T06:36:24.567

0

I think there's a fundamental misunderstanding of VM technology here. A VM can never completely pass through information to physical hardware without a layer in between. When you're 'running' DX applications, they're getting run on a virtual video card, that, if you're lucky is having its output accelerated by hardware(so direct X -> virtual video card -> opengl-> actual video card), or if you're unlucky, software emulated (in which case everything runs on the CPU, which, naturally dosen't excel at such tasks- else we wouldn't need graphics cards).

In short, your fancy hardware isn't doing anything with respect to what's in the VM.Dualbooting is really the only way to make use of your video cards.

Journeyman Geek

Posted 2011-04-01T04:36:19.350

Reputation: 119 122

Re: "In short, your fancy hardware isn't doing anything with respect to what's in the VM" -- If that were true (which it isn't as they explicitly tout hardware acceleration) then 3D games would fall flat on their face as a software-only implementation would completely choke them. Yet they play quite well, even in a window specifically because they are hardware accelerated. Again, it's just WPF that's causing performance issues. My guess is WPF is doing something different than just pure DX or else it should work. – Mark A. Donohoe – 2011-04-03T14:33:05.530

I think I found what the issue is... it seems WPF is still doing way too much related to the CPU so when virtualized, even though the 3D portions are passed to the accelerated hardware, the locking and syncing between the CPU and GPU, when virtualized, just kill performance. In short, doesn't look like there will ever be a solution until they 'fix' WPF. http://jeremiahmorrill.com/2011/02/14/a-critical-deep-dive-into-the-wpf-rendering-system/

– Mark A. Donohoe – 2011-06-19T00:21:01.313

0

I've been a software developer for 27 years. (Yes, back when it was just text and color ascii characters...)

Today I'm a Sr. developer for Windows/Web/Mac, and do my primary coding on a MacBook pro (with two external monitors- DVI and USB).

While I do 95% of my WINDOWS coding (.NET) through Windows 7 on Fusion (VMWare). I still have a 100GB partition with BootCamp.

By BootCamp? You already know why, because you can't get full video performance through a VM/emulator.

Oh and BIG TIP --- Don't launch your Windows 7 BootCamp through Fusion, even though they say you can. Actually it'll foobar the Windows 7 license, and you'll be calling Microsoft to re-register (because it'll tell you it's an illegal copy of Windows...)

Web Habitat

Posted 2011-04-01T04:36:19.350

Reputation: 111

I use my Win7 64-bit Boot Camp partition with VMware or Parallels regularly without issue. Yes, you have to re-register Windows, but you only have to do that one time, and MS will activate it without issue. Also, while yes, you can't get full video performance in virtual, you can get a really decent framerate with DirectX 3D games so there is no reason something as simple as a scrolling list or a slide animation in WPF should bite the dirt so hard. That's just a poor implementation. – Mark A. Donohoe – 2012-05-23T19:06:38.630