Sunday, October 19, 2008

Reducing startup time

For the upcoming 4.1 release I have actually been able to spend quite a lot of time to reduce startup time in Toad and hopefully there should be a quite noticeable difference. One of the changes made is to make the initialization multithreaded so the improvement should be even more pronounced if you have more than one CPU core.

There are a couple of other things you can do yourself in both 4.1 and versions before that to reduce startup time if you are annoyed by it.

  • Keep auto connect's to a minimum.
  • Don't show the web page on startup (This one will shave several seconds off your startup time because we don't need to load the IE component).
  • Disable the startup croak. This really doesn't save you much so if you don't mind it just leave it as is.
  • Don't both show connection manager tool window and new connection dialog on startup. The list of connections is a complicated control that takes a while to create so there really is no need to create two of them. Choose one way of opening your connections.
  • Try not to have every open tool window showing. Tool windows that are showing are initialized on startup and makes the application startup slower. Tool windows are not created until they are first shown so if you can't see them we don't waste time on them. Auto hide is also your friend here as the tool window isn't actually created until you zoom it in when auto hidden.
  • I might also add a note that collecting usage statistics takes so little time I can hardly measure it when profiling. Please enable it, it is really useful for us to evaluate where to concentrate our efforts for future development.

These two tips are only for advanced users who don't mind some more drastic methods to reduce startup time.

  • If you don't customize your toolbars and menues you can turn off saving and restoring these by unchecking this checkbox.
  • If you are ok with wasting some memory you can create a shortcut to run toad /prestart=true and then put that in your startup program folder. This will make Toad start pretty much instantaneous but the feature is not that well tested and might have some issues (Especially in regards to automation and running multiple instances of Toad).

Hopefully these tips will help you get to work faster in the future. As you can see from the previous post on the history of Toad for SqlServer we have already gone from 12 seconds to 5 seconds even though we have added tons of functionality.

No comments: