Answered by:
Visual Studio 2010 waiting 10 seconds at start looking at vspdmc.lock

Question
-
Yeah I know ... we are all getting tired of those whiny questions about visual studio being slow to start, build, brew coffee, do the laundry ....
But I got tired of it consistently spending 30 seconds starting up, even after disabling all extensions, removing Resharper, cleaning out any Most recently Used and disconnecting the network cable. So I started up Processmon, and noticed that it is spending 10 out of the ca. 30 seconds staring at this file:
C:\Users\Lars\AppData\[myusername]\Microsoft\VisualStudio\10.0\vspdmc.lock
The callstack for devenv.exe didn't make much sense to me ... so I was hoping others might check to see if they experience the same thing?
If I deleted (actually I just renamed it ... I'm not THAT brave ... it just created a new .lock file and spent 10 senconds staring at it at next devenv.exe startup. The lock file just contains a GUID. A new guid was created after renaming the file.
Anybody got any clues as why its taking that long and what it is doing? And how to fix it?? I know 10 seconds doesn't mean much and even if I fix it, it will never make up for how much time I have put into asking this question :-) But it bugs me.
Thursday, February 3, 2011 3:23 PM
Answers
-
Hi,
The weirdest thing is that after installing Windows 7 SP1, I no longer experience that 10 second wait while starting vs. So lets close this now. I am sorry that I no longer am able to trace the problem for you though...
- Proposed as answer by Radames Cruz [MSFT] Friday, February 18, 2011 11:45 PM
- Marked as answer by LarsWa_Discontinued Friday, February 18, 2011 11:49 PM
Friday, February 18, 2011 11:07 PM
All replies
-
Hi LarsWa,
Thank you for posting.
I'll take some time to research your issue. I'll feel free to let you know if I have any update.
Thank you for your patient.
Best Regards,
Larcolais
Larcolais Gong[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Friday, February 4, 2011 10:09 AM -
Super. Let me know if you need more info. Like a Processmon trace or something. That will show you the stack when this is happening. Might be usefull?Friday, February 4, 2011 10:36 AM
-
Hello Lars,
The Processmon trace will be very useful. Please provide it to us. I believe zipped it should be small enough to be sendable by email, please send it to radames.cruz at the expected microsoft.com domain. If there is any problem sending it by this medium please let us know so we can try an alternative.
In order to diagnose this issue better, please tell us also the following general information about your machine:
- OS
- Processor
- Memory
- Hard disk space
Thank you,RadamesSaturday, February 5, 2011 12:12 AM -
Hi Radames,
I send the trace for you. My machine is a new Lenovo T410s .... Core i5, with 8 GB RAM, and a fast SSD. I'm running Windows 7 x64 (ultimate ed.)
Saturday, February 5, 2011 12:24 AM -
Hi LarsWa,
Thanks for your patient.
@Radames, Thanks for your assistant. If you have any findings, please feel free to let me know.
@LarsWa, could you please send your processmon trace file to me? ( v-xugong at microsoft.com)
If you have any findings, please feel free to let me know.
Best Regards,
Larcolais
Larcolais Gong[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Monday, February 7, 2011 2:38 AM -
Hi Larcolais,
I've emailed it to you as well.
/Lars
Monday, February 7, 2011 12:08 PM -
Hi LarsWa,
Could you please try to create a new project on your machine and reload this project? Does it work?
Please feel free to let me know how it goes.
Best Regards,
Larcolais
Larcolais Gong[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Tuesday, February 8, 2011 8:09 AM -
Hi Larcolais,
I did the followin:
* Creating a solutions with a project,
* Unloaded the project
* reloaded the project
Was that what you needed me to do? This works fine. Have worked all the time. I did it last week with a larger project, so it's been tested with size as well.
Tuesday, February 8, 2011 9:09 AM -
Hi LarsWa,
Could you please try to delete the vspdmc.lock file and try to restart VS again?
Additionally, could you please install Performance Diagnostic Tool, and obtain an ETW/Xperf profile? This can help us know exactly what is happening during those 10 seconds.
If you have any findings, please feel free to let me know.
Best Regards,
Larcolais
Larcolais Gong[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Wednesday, February 9, 2011 7:42 AM -
Hi LarsWa,
Could you please try to delete the vspdmc.lock file and try to restart VS again?
Additionally, could you please install Performance Diagnostic Tool, and obtain an ETW/Xperf profile? This can help us know exactly what is happening during those 10 seconds.
Hi,
If I delete the .lock file, it appears again right before the 10 seconds wait.
I tried installing the PDL, from the link, but informed me that I already had a later version installed. Ho do I use it to capture a trace?
Saturday, February 12, 2011 5:25 PM -
Hi LarsWa,
You can find this tool in your start menu named Performance Diagnostic.
Then in ETW/Xperf tab, please click ‘Start Profiler’ button first and then you can start VS.
After VS was started up, please click ‘End Profiler’ and generator the .etl files which can be used for troubleshooting. You can click ‘View Profiles’ to find these files in your hard disk.
Best Regards,
Larcolais
Larcolais Gong[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Monday, February 14, 2011 10:26 AM -
Sorry, but there is no such thing in my Start Menu - where in the filesystem should I be able to find it? I ran the installer again to get more info on what failed, and this is what it spat out:
(I think maybe the error is that I have already installed the Windows SDK with debugging tools - the .net 4 / Windows 7 package)
Any ideas??
"
Component WPT Performance Suite has failed to install.
The following components were successfully installed:
- .NET Framework 3.5 SP1 Client Profile
The following components were not installed:
- Debugging Tools for Windows
The following components failed to install:
- WPT Performance Suite
See the setup log file located at 'C:\Users\Lars\AppData\Local\Temp\VSD1B7D.tmp\install.log' for more information.
"
Monday, February 14, 2011 1:19 PM -
Hi,
Sorry for the late. I upload Performance Diagnostics Tool User Guide here. You can check this file which descripts more detailed steps.
Best Regards,
Larcolais
Larcolais Gong[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Thursday, February 17, 2011 2:14 AM -
Hi,
The weirdest thing is that after installing Windows 7 SP1, I no longer experience that 10 second wait while starting vs. So lets close this now. I am sorry that I no longer am able to trace the problem for you though...
- Proposed as answer by Radames Cruz [MSFT] Friday, February 18, 2011 11:45 PM
- Marked as answer by LarsWa_Discontinued Friday, February 18, 2011 11:49 PM
Friday, February 18, 2011 11:07 PM -
Glad to know the problem was solved for you. Let us know if it happens again, we are certainly interested in finding the root cause if possible.Friday, February 18, 2011 11:44 PM
-
Hello everyone
I think I'm experiencing the same effect. VS2010 takes long to startup, even after quitting and restarting it. Process Monitor reveals at least a 12-second delay when devenv tries to read the same file, C:\Users\<myuser>\AppData\Local\Microsoft\VisualStudio\10.0\vspdmc.lock. I do have installed SP1. This happens whether all my VS extensions and addins are present or not.
Could please anyone help me with this?
Thanks for your attention
regards
Monday, August 22, 2011 5:52 PM -
Did you install Visual Studio SP1, or Windows 7 SP1? Or Both?Monday, August 22, 2011 6:08 PM
-
Both Win7 SP1 when it came out and (after some time if I remember correctly) VS2010 SP1 when it came out.Monday, August 22, 2011 11:17 PM
-
Visual Studio slow load got me investigating and I found the same 10 seconds wait on the vspdmc.lock file.
I'm running Visual Studio 2010 Professional with SP1 installed.
What I discovered is that Visual Studio was rebuilding the extensions cache every time it was being loaded. This was caused by one of the VS extensions touching the registry and causing VS to believe its extensions cache is out of date.
Rebuilding the extensions cache seems to include waiting on the vspdmc.lock file for exactly 10 seconds. Once I removed the rogue extension (actually it is the extension that I'm developing ;-), Visual Studio was loaded happily and 10 seconds faster.
To find this I ran VS from the command line and added the /log argument. See the extract from the log file below (I removed the specific node information):
18
Discovered 14 PkgDef files
19
Newest node in pkgdef cache ... details of the node here
20
Warning
Current pkgdef cache timestamp is not valid
So, if you get a line like #20 above in your log, then cache rebuild is your problem and you should look for whatever is triggering the rebuild - most likely one of your installed VS extensions.
- Proposed as answer by Doron Ofek Thursday, September 27, 2012 12:12 PM
Thursday, September 27, 2012 12:11 PM -
Vert cool finding Doron! Thanks for sharing.
- Edited by LarsWa_Discontinued Thursday, September 27, 2012 3:32 PM
Thursday, September 27, 2012 3:32 PM