1
Vote

PTVS causes slowdown of debug menu for all project types (C#, Python, Node.js, etc)

description

PTVS 2.1, any recent build (May 2014)

Start a new instance of VS
Create a C#, Python or Node.js project
Check task manager, make sure that VS is idle
Click on the debug menu

Result: You'll have to wait some time before the menu appears. On my machine (2 core, 4GB ram) it takes 3-5 secs.

To repeat, you'll need to close VS, as subsequent clicks on the debug menu are fast.

I've verified that this is caused by PTVS, and PTVS only (NTVS doesn't seem to cause it). Uninstall PTVS and you won't see the slowdown for C# projects.

comments

Zooba wrote May 19 at 10:30 PM

This appears to be because we are loading the cached DB for the project's active environment in PythonToolsPackage.TryGetStartupFileAndDirectory, which has to return the analyzer.

It looks like we can change this to return the active environment, which should avoid loading the DB.