angular-vs-repeat
angular-vs-repeat copied to clipboard
allow vs-excess act as a buffer
Can you make it that when you have a big vs-excess, you are able to scroll to a min number of items that are offscreen (but rendered) before you render more items (to the vs-excess value). Essentially make it act like an infinite scroll. This could let scrolling be smoother when rendering new items is expensive.
Right now it feels like even though there is an excess, many new items are still being rendered each time you scroll.
We have also experienced this. Even if you specify a vs-excess of, let's say, 20 (10 above and 10 below the visible content), rendering of the next item happens when you scroll more than one item, one at a time. You can see the little stuttering of the scrolling element at exactly the same moment. This probably also means, that a digest cycle is triggered for each rendering of an item. Like this, vs-excess only serves as a buffer of rendered content for fast scrolling, so that you don't scroll into the unrendered area.
But let's say, we introduce a parameter vs-chunksize="5". We could scroll 5 items without rendering anything (as 10 items are prerendered), and only after the 5th item do we move a chunk of 5 items to the bottom. One digest cycle for 5 items, wouldn't that improve performance? At least for items, that are rendered fast, so that the digest for 5 items does not take significantly longer than for one.