r/reactjs • u/Suitable_Language_37 • Sep 26 '26
Cerious-Scroll: Extremely Fast Dynamic Height virtual scrolling without scrollbar drift or blank space
One of the things I haven’t talked about much with Cerious-Scroll is how it behaves during actual scrolling, especially with variable-height content.
From the beginning, the goal was for virtualization to not look like virtualization.
So even with a large variable-height dataset, you can grab the scrollbar and drag it around quickly without getting the usual weirdness:
- No scrollbar drift
- No white space during fast scrolling
- No waiting for rows to render after you get there
- Accurate variable-height positioning
- Native scrolling behavior
- Constant DOM size regardless of dataset size
The variable-height part is probably my favorite. The scrollbar stays where it should, even when the actual row heights are all over the place.
You can also jump directly to an index way down in the dataset without needing to measure everything before it.
I’ve got demos/benchmarks here if anyone wants to mess with it:
ceriousdevtech.github.io/cerious-scroll
Core:
github.com/ceriousdevtech/cerious-scroll
React:
github.com/ceriousdevtech/react-cerious-scroll
I’m curious how it behaves against some real-world ugly datasets, especially ones with wildly different row heights. Try the scroll engine and tell me your thoughts.
View all comments
Show parent comment
1
u/Suitable_Language_37 Sep 26 '26
It doesn’t maintain a height/position entry for every row, so memory usage doesn’t grow with the number of items. That’s the main difference.
The basic idea is that the scrollbar represents progress through the dataset rather than requiring a cumulative pixel-height map of every row.
When scrolling:
So whether there are 100K, 100M, or more rows, there isn’t a 100M-entry height cache sitting in memory. The amount of DOM/rendering state stays bounded by the visible window/overscan rather than dataset size.
That’s also why jumping deep into a very large variable-height dataset doesn’t require calculating the cumulative height of everything before it.
On the mobile issue, what device/browser are you using? I’ve tested it on iPhone without seeing it get stuck, so I’d definitely like to reproduce that.