-
Notifications
You must be signed in to change notification settings - Fork 28.8k
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
Explorer can freeze for large folders and many glob patterns #9962
Comments
Tree performance... I have seen this as well when opening the typescript workspace where they have one test folder with many thousand files. Maybe worth looking into a performance trace there to see what can be done. |
This cannot be important because we shipped with this for years. |
When I open the tests/baseline folder of the TypeScript workspace (it includes 18000 files) it takes 30 seconds to show the contents (not seeing any progress during which, filed #10459). @joaomoreno most time seems to be spend in the treeModel#Item() function, can you take a look? The profile is here: explorer.cpuprofile.zip One thing to note is that the explorer is not using templates yet but I would not expect that to be a problem for 18.000 elements where most of them show hidden. Only a problem when quickly scrolling through the results. |
Just comment out this section and you'll get rid of the UI performance bottleneck. And obviously so: every filter call is going through all the sibling files, for every file, making this It immediately becomes more responsive, although it still takes ~5 seconds on my machine. Most of that time is spent on the file service and the file viewer classes: |
I pushed a fix that avoids the O(n^2) issue for most cases but if the user has configured a filter pattern where I need to know the siblings ( |
Pushed another fix to ignore glob patterns that need to check on siblings when the number of files in a folder exceed a threshold. Expanding the typescript/test/baseline folder with 16.000 files still takes 3-4 seconds but is much better compared to the 30-60 seconds we used to have. Closing. |
Steps to Reproduce:
Then the window will just freeze. No response to click or keyboard whatsoever, until after a while the system reports that "The Window is no longer responding".
Thank you!
The text was updated successfully, but these errors were encountered: