preact-scroll-viewport icon indicating copy to clipboard operation
preact-scroll-viewport copied to clipboard

Possible perf improvements?

Open kun-zhou opened this issue 8 years ago • 0 comments

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?

kun-zhou avatar Nov 25 '17 10:11 kun-zhou