We are working with a virtualList to display hundreds items with variable content, without render delays.
The performance it’s great, but we were experiencing scroll “jumps” so we redefine the height property, not as a constant but as a function, inspired in this post.
What you are doing is super slow even in theory. If you want fast performance you shouldn’t query the DOM sizes, it is always slow. Ideally it is designed to be used with checking item object and based on that decide the size.
For example if item has image then height should be 100, otherwise 40.
I’ve supposed the ‘append’ was not a good idea… Indeed, if it was as simple than that, maybe the framework would do it automagically.
After many frustrated intents to calculate the correct height for each case, we decided apply some CSS tricks (vertical alignment, margin, padding, etc) to fix items height independently of their content.
Finally, I would like to thank you so much for your great apport developing and sharing this tool.