preact-scroll-viewport
preact-scroll-viewport copied to clipboard
Possible perf improvements?
I was wondering why create the array of elements in the first place. Since we are already only rendering the children in the Viewport, why construct all the elements and stuff them in an array in the first place? This way we could save the computing power of reconstructing a huge list in the first place.
Maybe we can pass down the data array directly to ScrollViewport and only construct those elements that does actually end up in the Viewport and get rendered?