Skip to content
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

Improve performance of participant table for large number of participants #48

Merged
merged 18 commits into from
Aug 1, 2024

Conversation

tomasr8
Copy link
Member

@tomasr8 tomasr8 commented Jun 4, 2024

Deployed here: https://indico-checkin-test-2.app.cern.ch/

We currently render the whole table which gets sluggish when there's a lot of participants (10k+).
The list now uses infinite scrolling instead which makes it much more responsive.

Additionally, we normally preload all data from IndexedDB before switching to a new page (e.g. when navigating to a regform). With a large participant list, this introduces a visible lag when preloading all participants from the DB. I changed it so that the participants are loaded after the page is loaded. Note that, short participant lists will never see a difference since they are fast to load anyway.

More UX improvements based on feedback:

  • Added <ScrollRestoration /> globally
  • Made <ScrollRestoration /> work with the participant list i.e. when coming back from a participant the scroll position is restored - not as straighforward due to the infinite scrolling and the fact that we don't use a data loader here.
  • Scrollbar height remains constant as more participants rendered via infinite scroll (uses a placeholder with the same height as the full list)

@tomasr8 tomasr8 force-pushed the faster-table branch 3 times, most recently from 784ac85 to 5dd1aa3 Compare June 13, 2024 11:59
@tomasr8 tomasr8 force-pushed the faster-table branch 3 times, most recently from 46bf30c to 0ea4da6 Compare July 19, 2024 09:24
tomasr8 and others added 18 commits July 23, 2024 09:58
When there are a lot of participants (10k+) the preloader
takes too long which makes the page unresponsive. We instead
load the page immediately and then load the participants.
- Scrollbar height remains constant as more participants rendered
via infinite scroll
- Scroll location is restored when coming back from a participant
page
- Filteres are saved in local storage (scoped by regform id) so
they are preserved when navigating to differenting pages.
Copy link

📝 Lighthouse report

@tomasr8 tomasr8 merged commit 63a3947 into indico:master Aug 1, 2024
1 check passed
@tomasr8 tomasr8 deleted the faster-table branch August 1, 2024 09:51
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.

1 participant