Item 9 of 31 Previous | Next

5
Vote

Performance problem in Visual Studio

description

When I have VisualHG installed the Visual Studio GUI regularly locks up when typing. It can freeze for as much as 1 second every 5-10 seconds or so and it freezes twice in a row every time I save. When ReSharper is installed it gets twice as bad. This renders the plugin almost unusable for me. I am working on a medium sized project, 80 MB repository, 6000+ commits.

I did a performance trace with dotTrace and here's a screenshot of the badly performing call stack on the GUI thread http://i.imgur.com/VU8u9.png

Please move FDoIdle processing to a background thread so I can install VisualHG again.

comments

BerndSchrader wrote Jan 7 at 4:36 PM

Hi damianh, weazl

You're right with your conclusion about ReSharper cache activity.

If any tool like virus-scanner, MS index service or even ReSharper modifies files inside the
used HG repo directories, a background worker starts checking the state of this file.
So, it is recommended (also by Mercurial and THG) to exclude repo directories from
these tools. But, I will see to implement better optimized glyph update routine by
generating a 'used in project' file map.

If nothing helps, you can disable the 'out of IDE file tracking' in the VisualHG options page.

@Why the DirectoryWatcher does not utilize the .hgignore file?
- Ignored Directories can nevertheless contain versiond files.

@It also appears that the glyph refresh code is brutish
- this is MS standard way and normaly there is no problem with, because high frequent file changes
are not common in a source file repo.

@Please move FDoIdle processing to a background thread
- this is not possible because the GUI crashes if you call this from an other thread.
But almost all work is done in the background.

Regards, Bernd

damianh wrote Jan 5 at 11:44 AM

Related ReSharper issue: http://youtrack.jetbrains.net/issue/RSRP-287101

It appears that changes to ReSharper caches, if they are stored in the solution folder, will cause the SccProviderService.SetNodesGlyphsDirty() to be called regularly and very often. This then results a glyph refresh, a locked UI and a stuttery typing experience.

A workaround is to store ReSharper caches in the System TEMP folder.

I've briefly poked around the code and I could be wrong here, but it appears the DirectoryWatcher doesn't utilize the .hgignore file?

It also appears that the glyph refresh code is brutish - all glyphs are refreshed, not just the one that have changed? (Again, I could be wrong, please correct me if I am)

weazl wrote Dec 20 2011 at 8:02 AM

Attached screenshot as well