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

Pagination Performance Improvement #310

Closed
aahei opened this issue May 26, 2023 · 3 comments
Closed

Pagination Performance Improvement #310

aahei opened this issue May 26, 2023 · 3 comments
Labels
frontend Front End tasks Story Point: 3 backend or full-stack change. maybe adding an endpoint or changing the response of an endpoint + the

Comments

@aahei
Copy link
Member

aahei commented May 26, 2023

Currently, the new pagination feature requests all results from PPAPI, which might be inefficient, as there are around 6000 records for courses. PPAPI endpoint does not support range queries for now. Therefore, the temporary solution, before the feature is implemented, will be to request only the first few pages, and then request more only when users reach the end of the list.

@aahei aahei linked a pull request May 26, 2023 that will close this issue
4 tasks
@js0mmer js0mmer removed a link to a pull request May 31, 2023
4 tasks
@aahei aahei mentioned this issue Jun 9, 2023
4 tasks
@js0mmer
Copy link
Member

js0mmer commented Dec 5, 2023

I think this might be more related to websoc-fuzzy-search, given that we call that first on the frontend, get the list of courseIds, and request information for those specific courses from PPAPI through our backend.

@js0mmer
Copy link
Member

js0mmer commented Feb 1, 2024

Potential improvement: only get websoc-fuzzy-search results for a window of 3-5 pages at a time.
e.g. the current page + the 2 pages after it; for page 1 this would be the current page + 4 after, for page 2 + 3 after.
We only need enough data to be able to render the 5 page number buttons (and prev, next) in the pagination component appropriately

Limiting results speeds up response time of websoc-fuzzy-search greatly. The problem is, we can not specify offset for websoc-fuzzy-search. This means we would have to load all the results up to the current page plus the 2 after.

Being able to specify an offset may allow for faster response times but I'm not entirely sure since I don't know the implementation details. It may be just as slow as loading everything up to that page plus the 2 pages after so we should try that first.

An alternative, possibly simpler improvement: load first 5 pages of fuzzy search initially and render the page, load the rest in the background so it's ready by the time the user clicks one of the pagination buttons.

@js0mmer js0mmer added Story Point: 3 backend or full-stack change. maybe adding an endpoint or changing the response of an endpoint + the frontend Front End tasks labels Feb 1, 2024
@js0mmer js0mmer closed this as completed Nov 15, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in PeterPortal Client Nov 15, 2024
@js0mmer
Copy link
Member

js0mmer commented Nov 15, 2024

search overhauled in #505

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Front End tasks Story Point: 3 backend or full-stack change. maybe adding an endpoint or changing the response of an endpoint + the
Projects
Development

No branches or pull requests

2 participants