CodeNav icon indicating copy to clipboard operation
CodeNav copied to clipboard

Performance issues with CodeNav in Visual Studio 2019

Open Bergam64 opened this issue 3 years ago • 2 comments

Hello Samir,

I need to report serious performance issues when using CodeNav v8.8.32 running on VS 2019 v16.11.4.

CodeNav generally makes VS 2019 significantly slow (compared to when CodeNav is disabled), e.g.

  • When opening a file.
  • When switching document (<Alt+Tab>).
  • When splitting a document view in 2 (with the button above the right-hand scrollbar).
  • When saving.
  • ...

I've been using CodeNav since VS 2019 was released and I don't remember such severe issues in the past.

Note: I typically have 20 to 40 C# files open in VS, in case that matters.

Now and then, I even get bad performance warnings from VS, like the following one: Visual Studio stopped responding for 7 seconds. Disabling the extension CodeNav 2019 8.8.32 might help.

Please investigate. I suggest you to do some serious code profiling to find out which part of CodeNav turns out to be slow and/or too memory hungry. I would also make sure that any event handler you may have is properly unregistered when needed, to avoid having them being still called when you no longer expect it. Just my 2 cents.

Best regards, Didier

Bergam64 avatar Feb 03 '22 09:02 Bergam64

Unfortunately the slowdown is a known issue that I am still trying to solve. You can read some more here on which options might be a workaround for you: https://github.com/sboulema/CodeNav/wiki/Options

sboulema avatar Feb 03 '22 10:02 sboulema

IDK if it would be useful, but the biggest slowdown occurs each time the files are saved. Either by Save or SaveAll command, or when some refactoring is done. If CodeNav does reloading on an instance that isn't currently visible - maybe that's the good place to mitigate the problem? When a project is opened, everything works quite normal. But then when more files are opened and closed - here's when it starts to slow down. I open a very small file, just 20 LOC. I press Ctrl+S and VS just chokes while saving.

HTD avatar Feb 03 '22 13:02 HTD