Skip to content

fix(pagination): optimize OdsPagination to prevent performance and memory issue #797

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

Poppyto
Copy link
Contributor

@Poppyto Poppyto commented May 30, 2025

OdsPagination control suffers from rendering a lot of hidden components and using too much memory.
If totalPages is 5000 elements :
Actual code will create an array of 5000 elements and then UI will render 5000

  • .
    This will significantly slow down the UI in this context (you can await more than 2 seconds before be able to click)
    Worst, if you increase totalPages to 1000000, the browser will crash with OutOfMemory.

    The purposed fix create only visible pages.

  • …ating infinite DOM <li> components when totalPage is a big number
    @Poppyto Poppyto requested a review from a team as a code owner May 30, 2025 09:27
    @dpellier
    Copy link
    Contributor

    dpellier commented Jun 5, 2025

    Moved to #800
    Thanks for the contribution.

    @dpellier dpellier closed this Jun 5, 2025
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    3 participants