-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
[Bug Report][3.6.8] VTreeview slow performance on expand #19919
Comments
Still faster though, treeview seems to be rerendering every node at least twice. |
Yeah, there are unnecessary renderings |
+1 on this issue. It is also a huge problem for me. I am currently trying to mitigate it by loading all items initially with an empty children array and then using the load-children prop to "fill" the children with the remaining items by resolving a fake Promise. It's a rather hacky workaround and not yet fully working for me as I need it but the only way to get a decent speed. Any ideas on timeline for resolving this issue? |
+1 |
Concluded two redundant renderings, on every open event:
|
Hi, Thank you for working on this btw :) |
The remaining latency is from vuejs/babel-plugin-jsx#712 |
+1 also facing big problems with performance with > 100 items |
Edit: First things first: Thanks for all you guys working on this ❤️ I managed to get the expand issue mitigated a bit by using mutliple VTreeviews with v-for. That way the performance issue does not scale that much and is only really noticeable in big branches of the tree-view. However, I have another big Issue in terms of performance which is the initial rendering of a big treeview. Is that the same Issue as already tackled here, or rather its own Ticket? And any Tips on dealing with that? I'm sure we can come up with some ways when using the sub-components and basically re-build it with that with some kind of staggered addition to the DOM on the various trees or depth-levels, but maybe there is something planned for that already or something I don't see yet? |
Would it be possible to get an update on what the plans are for this issue? This is a major blocker for our migration to vue3 right now. I'd like to have an idea if I need to try to figure out an alternative to using I saw a comment from @yuwu9145 on the upstream ticket (vuejs/babel-plugin-jsx#712 (comment)) last week that setting the Is there anyway I can manually set that on the component or in the vuetify config? Reading the related docs on that ticket didn't make it clear to me how I could leverage that flag. I see that 3.7 was released, but it seems like Thank you. |
Hi, I'm using the Here's the Vue2 Vuetify2 codesandbox (mdi font not working but example still works): Here's the Vue3 Vuetify3 version using play vuetify Something to note is also that adding the "activatable" flag on the newer version completely crashes it and you won't even be able to load it anymore (in my dev environment I see an infinite loop of Here's my actual webpage running now where you can see the treeview working super smoothly with Vue2 Vuetify2 and with 4 of these huge trees instead of 1 like this example (2 in english and 2 in french): And the link to the github for the treeview I have that I'm absolutely unable to transition at the moment: Hope this helps and hopefully this will unblock in the future. Thank you! |
Hi there, |
No. I've put it on hold. I couldn't figure out how to set the flag mentioned. I also tried a few things to work around the slow performance, like only loading the root list and none of the child nodes, then dynamically adding them from a store when the node expands but other bugs with the tree component was preventing me from getting it working how it needs to. At this point I'm just stuck either with the slow performance or simply removing the tree and coming up with an alternative way to show the data to our users |
Thanks @robertzak for the info. I'm in the same position, stuck using vuejs-tree. |
@pilladis How we solved it was loading the nodes dynamically for each branch when the extend is clicked. In this way we could mitigate performance issues. |
That's my plan as well. However the load on expand wasn't working. It looks like they fixed that in |
@lukinoe Could you provide with some code example, I would much appreciate. I have to render tree with 200 parent nodes containing 5-10 childs each, without the performance optimisation the tree component is dramatically slow and impossible to interact with. |
I made a quick and dirty (and vastly oversimplified) example of how I'm doing it. In my example it always loads the same children. In reality you need to look up the correct child array from your full tree and append them. It also isn't handling the recursive case (if you have a tree with more than 2 levels). In my own app, I have methods that first truncate the tree so it's just the root nodes. I also call the same truncate method on the children when I "load" them, so any grandchildren would also be "dynamically" loaded only when the user expands again. It is basically just setting the children to an empty array instead of the actual children. An empty array will let the underlying code call off to the In you case since your tree has 200 root nodes, I'm not sure this will really help you that much. My tree has only about 10 root nodes, each with a varying number of children (10, 25, 75, 100, etc) so this makes the initial tree load really quick for us. The more the user expands, the slower the tree becomes. Since you're still going to have to render 200 nodes no matter what, it may still be slow even if you don't load the children right away. |
For anyone that doesn't have a solution for their application, I personally gave up on the VTreeview entirely and I instead remade a treeview from scratch to fit my needs: Edit: If anyone knows how I can put this huge link in a normal link in my issues I would appreciate greatly, right now if I use the |
Environment
Vuetify Version: 3.6.8
Vue Version: 3.4.27
Browsers: Chrome 125.0.0.0
OS: Mac OS 10.15.7
Steps to reproduce
Expected Behavior
Should be as fast as using VList:
https://play.vuetifyjs.com/#eNp1k02P2jAQhv/KKKoEaMlCW/WShpVW26qnXlrtCZDWjQ24dWzLH5QK5b93kuDEhHBJ7JlnPt6xvT4n1hSLZ60fj54lWZI7VmpBHHvaSID8mBbEUCgEsXa1ScpTSrxTmwT+cuoOaPm4XG6Shm1owa2DY7pTBn2/gUv4EAEdku6N8hqORHiG4DMtuYwo5EIbmMwK5TJSOH4krsl7Bm2UtlBdhfTJOQZj3C8uKdINix077kRcLF9EeFx6EY0gMkd0XDSIndaOOfBZLbpeY82Yy/6wf4jxgTV0VUc8NpsBEGbUAJzG3kU/1qClmWs4jouxPUnc1EeJm4HA3BaG65ZiJ62MA8p2xAsH5zYRJY5kMJ3B6gmmFxuA0kxmsJ68WmbsZDsPdlLP16Knb3Q9+U4k2bOSSTeZw6SkPCVFobx0aYmFuBYsVd4JLlmUqQ78yZzjcm9DWKH2I2S/Koynw+IvhqHYkEELb+8U+8EIDdiO3+3pVeNEuny+3V0jX5hgPULb3W2/1eyyKFSpvWM0CzOH9g6FsXdWPPUF0hKf2TfmXg5cUMMkrIDTW67OW5NSUWaRWW8Hbry6MMXegKN3+Rl/Obz/VC8eHmY3yaBN9Ki9PfT3oHNiy9j/27szp1WK3+otGknHNHccsa8ngpeQQVFLaMTCnZhqNjBVg71hzhvZNnflisD7gxidwXJkBvfkB+U8an1M6ajGa3lRw2OiqnBtmj/C+aJ7vEk1l16I5rP9DxkApl0=
Actual Behavior
Slow and frozen
Reproduction Link
https://play.vuetifyjs.com/#...
The text was updated successfully, but these errors were encountered: