-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Perf] VS becomes sluggish/locks up after opening very large C++ files #2798
Comments
Hi all, I'm working on an open-source revitalization of an old game, and there are some large, unrefactored cpp files in it that freeze VS like clockwork when sonarlint is running, even with a good cpu and ram. Please feel free to use it for reproducing the issue if it's helpful, here's the link: A couple offending files we haven't yet refactored and trimmed down are: Edit - I was talking about this with one of my project contributors (we've both used and very much appreciated sonarlint for a few years now), and we both recall these performance issues being relatively recent, starting perhaps 1 - 1.5 years ago. He believes they began around the time you all added linting support for cpp header files, though I can't promise that's correct. Still, perhaps this information could be helpful. |
My team is facing this issue with our large legacy C++ code base. Is there any workaround suggested other than disabling the extension when working with large files (e.g. maybe UI settings, etc) ? We are using VS2019 as our IDE and this occurs on PCs with both corporate and default Windows antivirus. So from our perspective it is independent of antivirus configuration. |
This issue is still impacting my team and we are still very interested in a solution. Even something like that proposed in #1348 would be very welcomed as today we have to disable the plugin often. |
Notes: scrolling in the file generates a lot of tooltip items: Changing the tooltips to be lazily-created seems to prevent the IDE from freezing when scrolling. |
@duncanp-sonar just wanted to say thank for you picking up this investigation. I was excited to see the progress in the draft PR #3690 and downloaded the VSIX artifacts to give it a try in our code base. Happy to report that VS2019 did not face any crippling lack of responsiveness on some of our files which were known to exacerbate the issue. Once released this fix will have a great impact on the 100+ software engineers using sonarlint on a daily basis. |
@jdlanning thanks for the feedback and for trying out the fix - much appreciated! We expect this fix to be in the next release, planned for late this week/early next week. |
Looking forward to trying this on some large/slow files of our own! Thanks. |
* Add IErrorTag implementation that lazily-creates tooltips Relates to #2798
* Add IErrorTag implementation that lazily-creates tooltips Relates to #2798
* Add IErrorTag implementation that lazily-creates tooltips Relates to #2798
* Add IErrorTag implementation that lazily-creates tooltips Relates to #2798
Thank you, I'm now running (what I assume is) a release version of SonarLint that includes this fix (v6.13.0.62767). The problems I had with VS locking up on certain of my large C++ files seems to have been resolved. Thanks! |
@totalgee yes, that's the current release version. Thanks for confirming. |
No more slowdown and freezing in the files mentioned by @garethyr with the latest release on VS22. |
Description
Users have reported that VS slows down after opening very large C++ files (10k+ lines).
See the following community thread for more information : https://community.sonarsource.com/t/sonarlint-vs-extension-performance/54423
Repro
TODO - find a project with C++ with files of 10K+ lines
Candidate: https://github.com/llvm/llvm-project
Notes:
Areas to investigate - internal
Areas to investigate - external
Sample open source project
https://github.com/llvm/llvm-project
Instructions for generating a solution file:
The text was updated successfully, but these errors were encountered: