XAML Editor hangs for 4-10 seconds driving me mad
Asked Answered
B

3

7

I know similar questions exists but they don't address this exact problem.

I'm having an issue with Visual Studio 2008 SP1 whereby it hangs for 4-10 seconds whenever the xaml edit receives focus. It is literally driving me to despair and I'm about to move back to Winforms. Note - Just editing the straight up xaml (i.e no designer enabled) doesn't fix the issue.

I have done the following :

  • Disable the xaml designer
  • Disable all plugins Checked FileMon for activity during the hang (there is none)
  • Checked Disk / Paging for activity the hang (again, none)
  • Uninstalled Silverlight

Setup : Windows XP64 8 Core Zeon, 16Gb RAM

Berardo answered 24/11, 2009 at 16:21 Comment(0)
T
5

The designer for XAML in VS 2008 is weak. Many of these issues have been addressed and dramatically improved in VS 2010 (even in beta 2).

I've started using Blend exclusively for designer-work, and just setup VS to use the XML editor (instead of the designer) for dealing with XAML files. This makes editing instantaneous within Visual Studio, although you need to swap out to Blend if you want a design time experience.

Tureen answered 24/11, 2009 at 16:27 Comment(7)
I've gotta say though, I was hoping for more in VS2010 - it's not that much better, imho. Still won't work for x64 builds, for one, and it's still quite slow - annoyingly slow.Foch
Weak is polite, Reed. And my new VS2010 crashes when I go to try out that new XAML designer on x64. Is there a reasonable alternative to throwing out $$ on Blend just to get an decent low-end dev experience?Marilee
I think it's sad, but Blend is really the way to go. It's a pretty high end, polished designer experience. 2010 is okay, but you need to build targetting x86 (then it works okay, but not great). I agree the situation stinks, but that's really kind of the way it is...Tureen
I've found VS2010b2 just as bad for this. It takes a good 5-10 seconds to do the outlining (the bit that allows you to expand/colapse sections of code) every time a XAML window gains focus.Nirvana
I'm amazed that 64bit support isn't there... i guess that i won't be downloading the beta then. Anyone know if this is going to change?Berardo
Well - after a week of trying to get this to work i've given up and gone with blend for my xaml editing. it's a horrible solution, but it's solving my problem for the mo. thanks!Berardo
Yes, I have used VS2008, VS2010, VS2010 SP1, and now VS2012 RC. It doesn't get better. In VS2012, it DOES get better in that if the XAML designer crashes, it is appropriately sandboxed so it doesn't crash the whole Visual Studio instance. It's good to be positive and uplifting and say that 'it gets better in VS2010', but the truth is, it doesn't get better.Michellemichels
N
0

For me, the XML editor just didn't quite work right. What I did was in Tools/Options/Text Editor/XAML/Miscellaneous, activate "Always open documents in full XAML view." This prevents the IDE from trying to render your xaml at open and get right to editing your XAML. When you are ready to pay the render penalty, you can click on the design tab.

Because everyone knows writing xaml by hand is faster and more fun :)

Needs answered 24/11, 2009 at 17:29 Comment(1)
unfortunately, as I mention in my question, I've tried this with no success.Berardo
K
0

I had exactly same issue with XAML editor - every time I focused, saved, opened XAML code, the Visual Studio got stuck for few seconds.

For me the solution was removing reference to Microsoft.mshtml - I don't understand the reason (if someone does, please comment), but it really was the only problem and removing the reference solved my nightmare.

Kiel answered 13/1, 2010 at 12:29 Comment(2)
interesting.. i just checked all my projects and i don't have a reference to this assembly.Berardo
Well.. Maybe it is not only Microsoft.mshtml reference, which is problematic. You could try to remove references one by one and see, if it has any effect to XAML code editor performance (in my case no restart or rebuild was required, adding/removing the reference had immediate effect).Kiel

© 2022 - 2024 — McMap. All rights reserved.