With small projects, I can switch to viewing almost immediately (<1 s).
I have a large project that takes about 60 seconds to open a control or form in a design view - for the first time. After this 60-second delay, I can open any control in the project in design mode almost instantly - until I recompile the project.
If the exe created by this project is referenced in another (small) project, the small project instantly becomes as sluggish as the large project. Similarly, if I add all the files from a large project to a small project individually, the small project will become equally sluggish.
A large project refers to a large managed project in C ++, but if I add the same link (and call the function from the link to make sure it is loaded) in a small project, the small project still runs quickly.
My big project uses SandDock. If my small project uses SandDock, it is still fast.
My large project contains about 60 user controls that appear in the toolbar. If I add 60 user controls to a small project, the small project will still be fast.
If I make user controls hidden from the toolbar using [System.ComponentModel.ToolboxItem (false)], the large project is still slow.
The problem arises in both vs2005 and vs2008.
What can make a large project so slow as to open design for the first time? Some other links? A large number of controls? A large number of classes? Any other reason?
One thing I noticed (though perhaps a red herring) is that the ProjectAssemblies folder (C: \ Documents and Settings \ tim.gradwell \ Local Settings \ Application Data \ Microsoft \ VisualStudio \ 9.0 \ ProjectAssemblies) is huge (> 1 GB) and most folders here have a copy of my managed C ++ dll! It seems that these folders are recreated each time the project view is reopened (after recompilation). Could this have anything to do with moderation?
Additional Information:
A dashboard in a user control or form makes it take 60 seconds. Removing the dashboard (but still having several other controls on the form) allows the switch to instantly view the design.
This is not the whole story, though ... The toolkit in a completely new project does not cause a massive slowdown - so there should be something in my big project that affects the toolbars. In addition, some other forms / controls that do not have dashboards on them still take 60 seconds to display the design view, so anything affecting the dashboards also affects other controls. I will continue to try to pinpoint which controls and perhaps even what causes it!
c # visual-studio winforms
Tim gradwell
source share