Show the Toolbox faster
When I attempt to show the Toolbox, it takes a very long time for it to fully display.
We’re taking a closer look at this request and are looking for more information in the comments. Thanks!
I'd like to also note that many times when I go into a form, I do not even use the toolbox. When I open a form designer in many cases, I just want to change a few properties. What I find frustrating is that I have to wait for the toolbox to load before I can do that.
When I am creating a new form, there are other things that I could do while I am waiting for the toolbox to load if it would just load the controls that are part of my solution on another thread. Instead I have to wait before I can do anything whether I need to use those tools or not.
In my experience, when I turn off the setting in Tools > Options > Windows Forms Designer > Toolbox > AutoToolboxPopulate, the toolbox loads much faster. Unfortunately, this setting also prevents the controls that I have created in my own solution from loading, which is functionality that I need. In my opinion, I would like to see the items in the toolbox that populate from my own projects load on another thread. When that thread has finished loading the list of tools in my projects, then it could send that list to the UI thread to add those tools in the list to the toolbox.
I don't think that there is any way that the code in vs.net that actually loads that list could run fast enough that it would be able to run from the UI thread. The solution that I spend must of my time working in has 32 projects, probably over 100 user controls, and over 500,000 lines of code.
Nathan Halstead commented
This is exactly the type of feedback I was looking for. Thank you both! Anybody else have experiences you'd like to share?
Alexei K commented
I've used both VS 2008 and now 2010, and my issue with the Toolbox is persistent in both. It's not that it takes a while to show the items (if there is work to do, it's going to take time), but that it makes the rest of the VS UI seem sluggish. When I open the tool box and it's trying to load items, I can't easily switch to code (the toolbox is slow to disappear) and performing other UI actions becomes slower and choppier in execution.
So if you can improve the performance of the Toolbox itself, that's great. What I want at the very least is to have its performance decoupled from the rest of the VS UI and functionality. In particular in 2008 especially typing code used to become slower while Toolbox is opening... that should definitely never happen. 2010 helps, but not perfect in this regard either.
I guess basically I would settle for it not interrupting my work while it's trying to load.
Eric Harmon commented
I have Developer Express Ultimate loaded, and that's the only third-party package of any significance (in terms of number of components) that I use. The main project that I work on where I see the noticeable delay is a VS2008 solution with 11 projects in it. One of the projects contains 162 datasets, where each dataset contains just a few datatables. So all of those tableadapters populate the toolbox as well.
To replicate the issue, I can load VS2008, open the solution, and then double-click on one of the datasets or a form in order to load the designer. At that point, the toolbox loads and I need to wait a long time (I just opened a small dataset with a single table and clocked it at a minute and 30 seconds) for it to load. This is on a 3.33 GHz 6-core i7 machine with 16 GB RAM running Windows 7 64-bit Professional, so it's not a slouch machine.
I converted the solution to VS2010 SP1 and ran the same test, and it took 53 seconds. So performance has improved significantly in VS2010 (on this solution, at least) but hopefully it can be improved further.
Nathan Halstead commented
I'm an engineer on the team that is responsible for toolbox performance. For anybody watching this thread, I'd be interested in learning more about when you experience slow performance with the toolbox. Information about the version of Visual Studio you are using, the size of your solutions, the number of custom controls, and the designers you work with the most often with when you experience issues would be most helpful. Thanks in advance!
Visual Studio Program Manager