Tutorial :Visual Studio Performance when editing XAML/Silverlight files



Question:

When I work on Silverlight projects within Visual Studio 2008, I regularly notice that the XAML editor hangs for up to 10 seconds. This because Visual Studio consumes 100% CPU during that timeframe. Any ideas how I could fix that? I assume this is some kind of background compiling for itellisense or something similiar. It happens during editing, multiple times an hour, without me doing any special actions.

System:

  • Server 2008 Std
  • Visual Studio 2008 SP1
  • latest updates...

I wonder if anyone else experienced this issue. Any help would be appreciated.


Solution:1

The problem is that the xaml editor takes so long to draw the preview. Do you need the visual preview? If you don't, you can turn it off, and that's what we do on the Silverlight Tour. Tools->Options->Text Editor->XAML->MIscellaneous->"Always open documents in full XAML view". This option gives you all of the benefits of auto-complete without the killer wait times ;)


Solution:2

right click on the xaml file select open with select the source code editor

You will not get the visual preview however the file will open instantly and still have intellisense.


Solution:3

I totally agree with Hugo. I'm running VS2010 with a monster computer (64 bit, 24 GB RAM, i7 X980 3.33 GHZ 12 core processor), and the XAML performance is horrific. Yes, my solution is very large. Yes, we have a lot of XAML files. So what? There is ZERO conceivable reason why editing a XAML file (wysiwyg turned off) should have intolerable lags and delays.

UPDATE: I found a possible fix... I have been using the "Source Code (Text) Editor" as my default editor for XAML files. I did that to get rid of the wysiwyg designer, and hoping to improve XAML text editing performance, which did not happen. I just switched to "XML (Text) Editor", and editing is now snappy -- and intellisense still works. Such a simple change, and apparently a total fix. Just close all XAML files, then right-click on a XAML file, choose "Open With", selected "XML (Text) Editor", and click "Set as Default" and click "OK".


Solution:4

I don't know how the XAML performance is in VS2008, but in VS2010 it is terrible. With beta SP1 it completely breaks down to eternal refreshing. Using i7 with 8Gb ram, brand new computer.


Solution:5

1.Close all other apps you are running.Only use VS 2008 SP1.

2.Install KB958017 - Rollup Hotfix for several issues in WPF designer Visual Studio 2008

3.Move to VS 2010 !!! This is what it should have been like !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

4.Get more RAM.

5.Defragment HDD...

????


Solution:6

I'd recommend using Expression Blend. It doesn't suffer the same terrible performance as VS.Net for XAML and is more powerful and flexible for designing interfaces. I curse everytime I accidentally double click a XAML file in VS.Net and am franticalyl hitting the escape key.


Solution:7

What is your systems RAM? I have 3 GB ram and XAML editor hangs for 1/2 seconds sometimes but not 10 seconds.

I usually close all other apps while working with WPF applications. I also use Blend which is more faster comapred to VS xaml editor.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »