Closed davkean closed 2 years ago
@davkean I've made changes to the affected code that should resolve the issue. The changes are in the latest releases that were just published (v2022.1.3.0 for VS 2017/2019 and VS 2022). If there are any subsequent issues, let me know and I'll try to fix them as well.
I'm from the Visual Studio performance team and our telemetry is showing us that VSSpellChecker extension is causing Visual Studio responsiveness issues by triggering GCs. In particular, the method
SpellCheckFileInfo.sh
has a high allocation pattern which over the past 21 days, has caused VS to freeze the following amounts:(This is heavily sampled, so real number of hits are close to 10x this amount)
Expressed delays are situations where the UI hung while within this method and it interrupted/prevented users mouse or keyboard input. Total hits are all the times the UI hung while within this method, regardless of whether input was interrupted.
To resolve this problem, SpellCheckFileInfo.AllProjectFiles should be changed to reduce the number of short term allocations. Examples include:
https://github.com/EWSoftware/VSSpellChecker/blob/bb3d6283434b2f297479f8430d6889d5b2d94978/Source/VSSpellCheckerShared/ProjectSpellCheck/SpellCheckFileInfo.cs#L232-L234 https://github.com/EWSoftware/VSSpellChecker/blob/bb3d6283434b2f297479f8430d6889d5b2d94978/Source/VSSpellCheckerShared/ProjectSpellCheck/SpellCheckFileInfo.cs#L256 https://github.com/EWSoftware/VSSpellChecker/blob/bb3d6283434b2f297479f8430d6889d5b2d94978/Source/VSSpellCheckerShared/ProjectSpellCheck/SpellCheckFileInfo.cs#L278 https://github.com/EWSoftware/VSSpellChecker/blob/bb3d6283434b2f297479f8430d6889d5b2d94978/Source/VSSpellCheckerShared/ProjectSpellCheck/SpellCheckFileInfo.cs#L280-L281
-Dave