Thursday, January 17, 2013

Avoiding the VSMonoTouch/VS2012 slowness - deserving of a badge of awesomeness!

I've just received this advice from AlphaPage about how to avoid the very slow loading (3 to 4 hours) of the MvvmCross solution when using VS2012 with VSMonoTouch...

It's definitely deserving of....

Awesome - thanks - AlphaPage!


Hello,

If you want to quickly open the solution in VS2012 for the first time or when you rename the solution folder, here is how I do:
  • in Run dialog box, open : "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe" /safemode
  • open the solution (VS2012 will load Console or wpf projects only because of safemode)
  • close VS2012
  • open the solution in "normal mode"
  • reload projects in each folders except Samples folder You are done within less than 5 minutes.
If you want to open projects in Samples folder, disable VS2012Monotouch addin, restart VS2012 and proceed.

Then enable VS2012Monotouch addin, restart VS2012 and load the Touch UI project only when needed.

Why?

Touch library load quickly (no problem), but Touch UI project uses IphoneSimulator or Iphone configuration instead of AnyCpu.

I don't know why those projects are so slow to load, but if you change config to AnyCpu the project loads quickly (bug 1).

But another problem is if you don't unload all Touch UI projects, any project (even non Touch UI project) will reload very slowly (bug 2).

I mean if all UI Touch projects are unloaded, you can unload/reload other projects quicly except UI Touch project of course. But as soon as you load 1 UI Touch project, loading/unloading another project except UI Touch project becomes very slow.

Finally, I suspect VS2012 to reload all (or some) projects each time you reload 1 project resulting in cascading reloads and unnecessary loops (bug 3).

When you open the project for the first time, another feeling is that VS2012 is also waiting for some dialog box results in the background delaying the process depending on a timeout foreach dialog, but this is my opinion.

Hope this helps.

No comments:

Post a Comment