-
Notifications
You must be signed in to change notification settings - Fork 29.3k
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
MarkerService and ProblemsView do not scale well and block UI thread #11976
Comments
The problem is that we call |
We have found a couple of issues
|
@sandy081 I have pushed changes to send all events at once and to make reading of markers a little faster. that improves the situation a tiny bit. as discussed the culprit is the problems view. pls continue from here |
Thanks @jrieken for the changes. I will do the improvement is problems view as discussed. |
Root cause: Problems model is getting updated resource by resource and every time it is getting refreshed (filtered and sorted). So this is doing filtering and sorting as many times as the number of resources (in this case 2000). Fixed it by doing bulk update / refresh. Also did some optimisations in the model for better performance. After all this, amount of time came down from 20s to 1s Attaching the pre-fix and post-fix profiles here |
nice! |
reopening for me to further improve |
@sandy081 The last big chunk is |
I added another fix/improvement while applying filters. Using Tree.expand on each item or Tree.expandAll is not making any difference. Otherwise Closing this since we improved performance drastically. |
Repro steps:
View->Problems
to display the Problems pane.View->Command Palette...
and execute thePopulate Diagnostics
command.At this point, the VS Code debuggee window will stop responding as it populates a single diagnostic for 2000 files. This is very similar to the diagnostics produced for a medium- to large-sized C# solution (say, one generated by Unity) where there are a couple thousand files and each has a single "remove unnecessary using directives" diagnostic.
Expected result:
DiagnosticCollection.set(...)
should periodically free up the UI thread while processing.The text was updated successfully, but these errors were encountered: