-
Notifications
You must be signed in to change notification settings - Fork 28.9k
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
TreeItem is too slow #56234
Comments
@fabiospampinato Is it possible to share the performance profile you created to come up with above numbers? |
I don't know what you mean exactly by "performance profile", but I got the numbers this way:
Now:
I've taken these measurements multiple times just to be sure. All those numbers aren't super precise of course. I've run the code on an early-2015 MBP. I hope this answers your question, let me know if you need anything else. |
Thanks for detailed explanation. I got it now. Will investigate. |
I can see a small slowdown when a command and tooltip are included, but it's 10s of milliseconds, it shouldn't depend on the number of items in the tree, only the number that start out visible, and I don't see an obvious way to bring this down. Since this issue was filed, we've swapped out the internal tree that the extension tree is built on top of. I expect this new tree is faster. |
I've added the following view to Todo+:
I've been benchmarking it against magento2, which contains about 30k files and 2M lines of code. If the user has ag installed in his system the process of finding those todos is quite fast, its takes about 4s to do that on my laptop.
Quite surprisingly though the bulk of the time is spent on these lines, which are executed about 1k times, since the extension creates about 1k
TreeItem
s under these circumstances:Adding the tooltips requires about 500 extra milliseconds, I would expect that number to be near 0ms, I see basically nothing going on here that can justify that number.
Adding the commands requires about 4 extra seconds. 4 seconds for doing what? Creating those objects should be almost free, and until those
TreeItem
s get clicked they don't even change anything as far as the user is concerned, I think.Adding the icons requires about 14 extra seconds. There are less than 10 different images loaded, but for some reason loading them a few hundred times is that slow.
The text was updated successfully, but these errors were encountered: