Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS2010 loads slowly. Can I profile extensions' respective startup time?

I have a simple question. Is it possible to somehow get a log of what is taking so much time to load when starting VS2010? On a default install, starting the IDE is very quick (~1-2 s), but with a batch of extensions installed, the time taken for the IDE to launch is prohibitive of using it to "just have a peek at a file".

I know I can "enable and disable extensions one by one", but I'm looking for a better way that gives me numbers, not 'feelings'.

Hope someone out there knows a good way to do this.

Edit: Follow-up question: Can I selectively disable packages from loading into VS2010?

like image 874
Henrik Avatar asked Oct 22 '10 08:10

Henrik


People also ask

Why is Visual Studio 2022 so slow?

You might have extensions installed that slow Visual Studio down. For help on managing extensions to improve performance, see Change extension settings to improve performance. Similarly, you might have tool windows that slow Visual Studio down.

Why does Visual Studio take so long to start?

Visual Studio is designed to start up as quickly and efficiently as possible. However, certain Visual Studio extensions and tool windows can adversely affect startup time when they are loaded. You can control the behavior of slow extensions and tool windows in the Manage Visual Studio Performance dialog box.

How do I make my Vscode run faster?

Here's how to do it: Simply disable your extensions one at a time, and check to see if it made a difference. If your performance issues are obvious (E.g. files take 2 sec to open) than this should be quite easy. Disable → test → enable → disable the next one → test → etc.


2 Answers

You can use devenv /log as detailed here: MSDN Blogs: Troubleshooting Extensions with the Activity Log.

  1. Run devenv /log
  2. Close the IDE again to close the log Win+R,
  3. Run %APPDATA%\Microsoft\VisualStudio\10.0\ActivityLog.xsl
  4. Wait for it to load in Visual Studio
  5. Open %APPDATA%\Microsoft\VisualStudio\10.0\ActivityLog.xml in a web browser and it will format itself nicely.
like image 104
AntonyW Avatar answered Nov 15 '22 22:11

AntonyW


No need to upvote this answer, give it to Antony instead (or edit it into his, I don't have enough points):

  1. Run devenv /log,
  2. Close the IDE to close the log / stop logging,
  3. [Win]+[R], run "%APPDATA%\Microsoft\VisualStudio\10.0\ActivityLog.xsl"
  4. Wait for it to load in Visual Studio,
  5. Press [CTRL]+[ALT]+[F5], select ActivityLog.xml, or paste "%APPDATA%\Microsoft\VisualStudio\10.0\ActivityLog.xml" into the browser.
  6. View the formatted html.

FYI: Here was one of my slow extensions that I will get rid of and file a bug report in:

339  Begin package load [DPStudio.VSCommands.VSCommandsPackage, DPStudio.VSCommands, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1f57f29404ce1db6] {4D4B29B7-971B-4FF2-8604-CF9F67FBB705}  VisualStudio 2010/10/22
**09:20:11.275** 

340  Entering function VBDispatch::GetTypeLib   VisualStudio 2010/10/22 09:20:11.643   341  Leaving function VBDispatch::GetTypeLib {80CC9F66-E7D8-4DDD-85B6-D9E6CD0E93E2}  VisualStudio 2010/10/22
**09:20:11**.644 

342  Entering function VBDispatch::GetTypeLib   VisualStudio 2010/10/22 **09:20:20**.274 

343  Leaving function VBDispatch::GetTypeLib {80CC9F66-E7D8-4DDD-85B6-D9E6CD0E93E2}  VisualStudio 2010/10/22 09:20:20.274 

344  End package load [DPStudio.VSCommands.VSCommandsPackage, DPStudio.VSCommands, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1f57f29404ce1db6] {4D4B29B7-971B-4FF2-8604-CF9F67FBB705}  VisualStudio 2010/10/22 09:20:20.294
like image 29
Henrik Avatar answered Nov 15 '22 23:11

Henrik