DEV Community

Discussion on: Build your own virtual scroll - Part II

Collapse
 
devin6391 profile image
Vineet Dev

Hi Adam, I got to ask some more about performance optimisations. I have also tried to build virtual scroll with feature of two-way infinite scroll. But I got to admit that the solution I built wasn't much performant. Now, related to my project, I got two major questions:

  1. What about dynamically adding data to this component?
  2. What about mobile web performance? Mobile scroll is a totally different game which is much more complex to manage than desktop scroll and 60fps really matters there.(specially iOS)
Collapse
 
adamklein profile image
adam klein

Hi,

  1. Changing the data means you have to recalculate the positions of all the nodes
  2. In my projects, I haven't encountered any specific problems related to mobile, but obviously it depends on the device and the code

Can you share a link to your code and I'll see if I can take a look?

Collapse
 
indumathi1701 profile image
indumathi1701

Hai, I need to perform virtual scroll in JavaScript can you provide me the code for it

Collapse
 
devin6391 profile image
Vineet Dev

I cannot share as I have done this in my current organisation