Replies: 1 comment 1 reply
-
Thanks for the detailed write-up! Just to clarify, we only cache rendered nodes, If you're seeing steady growth, a minimal repro (e.g. on StackBlitz) would really help us take a closer look. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Looking at the examples given: https://tanstack.com/virtual/latest/docs/framework/vue/examples/dynamic
Whether it be the dynamic or fixed or some other one, when looking at the amount of DOM nodes in the dev tools performance monitor, it is a pretty steady unchanging number, while scrolling.
However, in my own personal implementation, the more I scroll up and down, the more DOM nodes seem to appear. I had the impression that reusing DOM nodes was a standard optimization included in virtual list implementations? I know that Vuetify's v-virtual-scroll reuses DOM nodes. I can see in the DOM that the items are actually being swapped in and out, but DOM nodes still increase.
I have checked my keys and they are all unique, and my implementation is pretty much a carbon copy of the above linked example, except I have removed the div wrapper containing the transform property, and put the transform on the v-for div's themselves.
I actually went so far to try and implement the exact dynamic example from the link above in a plain new vue project, and I still don't see any DOM reuse, DOM nodes keep increasing until a GC happens.
Am I chasing a red herring here, because of a lack of understanding of virtualization, DOM nodes, Devtools etc., or is my implementation botched somehow?
Here are 2 traces when scrolling up and down through a list of ~100 elements, one from Tanstack and one from vuetify's v-virtual-scroll
Tanstack

Vuetify

Beta Was this translation helpful? Give feedback.
All reactions