none
Why is VS designer so slow to open xaml? RRS feed

  • Question

  • Using VS 2013 with SL 5 with this xaml:

    <UserControl 
       
       x:Class="Guardian.EditObservation.Controls.PositiveChoice"
       
       xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
       >
       
       <StackPanel x:Name="LayoutRoot" Orientation="Horizontal">
          <TextBlock Text="{Binding Name}"          VerticalAlignment="Center"/>
       </StackPanel>
    </UserControl>

    takes 47 seconds on Processor Intel(R) Core(TM) i7-4770S CPU @ 3.10GHz, 3101 Mhz, 4 Core(s), 8 Logical Processor(s) and only Defender as Antivirus.

    That makes no sense.  There is no code behind, no database calls, nothing else than what you see.  How could it possibly take 47 seconds?  I'm guessing it is trying to do something that eventually times out, but what?

    Anybody got a clue?

    Monday, August 24, 2015 2:54 PM

Answers

  • (1) deleting the .suo file didn't make any difference. I don't have a .xxproj file as this is not a C# project. 

    (2) as far as I know, I don't have any add-ins.  My compiler is an extension.  I can't open ANY of my projects when running VS in safe mode.

    (3) don't have any other 3rd party processes that I know of.  Not sure what you mean by making sure task manager is "free".

    (4) I don't have any other VS2013 machine.  However, a co-worker who uses C# has similar slow loading times on xaml.

    So are you saying that that xaml, for you, doesn't open slowly?

    ... time passes ...

    So I made a completely new Silverlight project with only an App and a Page. Then I added a UserControl like the above.  It opens immediately.

    So that rules out most of your suggested issues.

    So how else could it take so long to load?  My solution has 54 projects, but I wouldn't expect that to make a difference when opening a single project that contains that UserControl.

    Any other ideas?


    ... time passes ...

    Well, I don't know what happened, but NOW the xaml is loading ok.  First time in a LONG time.  The only thing I did was delete the .suo.  And I DID restart VS after that.  Oh, I did try that /safemode and it didn't help, but now AFTER doing that NOT in Safemode, it does seem pretty good.

    Not sure what is going on, but it looks like it is fixed for the moment at least.

    Wednesday, August 26, 2015 12:03 PM

All replies

  • Hi mltiede,

    (1)If you delete .suo file in your project folder, and then re-open the .xxproj file, open the XAML file, how about the result?

    (2) To make sure that it is not the add-ins or extension tools issue, we could run the VS in safe mode.

    https://msdn.microsoft.com/en-us/library/ms241278.aspx?f=255&MSPPError=-2147217396

    (3) Close third party processes in windows like the Anti-virus or other, and make sure that the task manager is free, check it again.

    (4) To make sure that whether it is related to the windows Environment or VS Environment, if possible, please also test the same app in other VS2013 machine.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, August 26, 2015 5:38 AM
    Moderator
  • (1) deleting the .suo file didn't make any difference. I don't have a .xxproj file as this is not a C# project. 

    (2) as far as I know, I don't have any add-ins.  My compiler is an extension.  I can't open ANY of my projects when running VS in safe mode.

    (3) don't have any other 3rd party processes that I know of.  Not sure what you mean by making sure task manager is "free".

    (4) I don't have any other VS2013 machine.  However, a co-worker who uses C# has similar slow loading times on xaml.

    So are you saying that that xaml, for you, doesn't open slowly?

    ... time passes ...

    So I made a completely new Silverlight project with only an App and a Page. Then I added a UserControl like the above.  It opens immediately.

    So that rules out most of your suggested issues.

    So how else could it take so long to load?  My solution has 54 projects, but I wouldn't expect that to make a difference when opening a single project that contains that UserControl.

    Any other ideas?


    ... time passes ...

    Well, I don't know what happened, but NOW the xaml is loading ok.  First time in a LONG time.  The only thing I did was delete the .suo.  And I DID restart VS after that.  Oh, I did try that /safemode and it didn't help, but now AFTER doing that NOT in Safemode, it does seem pretty good.

    Not sure what is going on, but it looks like it is fixed for the moment at least.

    Wednesday, August 26, 2015 12:03 PM
  • Hi Mark,

    When designers get stuck upon opening, it often is an issue with the toolbox. Loading of the items in the toolbox can take a long time and block everything. Often related to 3rd party controls that are used.

    You could try to disable automatic loading of items in toolbox:

    Tools -> Options -> TextEditor -> XAML -> Misc, uncheck "Automatically populate toolbox"

    Rgds MM


    PS: Please mark as answer if helpful. Thanks!

    Wednesday, August 26, 2015 8:02 PM