I’m very curious to know more about how you achieved fast calculation and scroll detection.

VirtualScroller keeps track of what portion of items are being rendered on the screen since it requires that information to decide what stays and what goes. We can simply reuse that information without needing to do the calculation again. We also cache item heights so we can avoid computation-heavy Element.getBindingClientRect() as much as possible.