Skip to content

Clarification - how does overscan reduce DOM operations? #10

@omriyariv

Description

@omriyariv

Is it my understanding from reading the code that overscan will "align" the {startIndex, endIndex} to modulo overscan. However, I can't really see how this reduces any work in the DOM - if a continuous scroll operation results in adding 10 rows, sync mode would add them one by one (in the worst case) and overscan mode would add something like 10 rows in one operations. That sounds to me like the same "amortized" amount of work. Could you please elaborate on why this approach is more performant in terms of DOM operations?

Note: I do see an obvious perf optimization in not reconciling the entire visible viewport on each scroll event - but if I understand it correctly that is only VDOM work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions