-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: improve review page loading times #3189
Conversation
229253d
to
f2a455c
Compare
backend/src/main/kotlin/org/loculus/backend/api/SubmissionTypes.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the slow review, and sorry that this issue wasn't fully specced. Unfortunately I think the PR at present is problematic as it could use 20 MB of bandwidth every few seconds.
website/src/types/backend.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that if we were to make the changes in this PR we need to not send sequences in the endpoint used on the review page. This is is because:
- sequences for some viruses are 200 kb, 100 per page = 20 MB, polling constantly = a lot of bandwidth
We may want to delay making any change here for now for simplicity to avoid having to add extra types etc.
…s.kt Co-authored-by: Theo Sanderson <[email protected]>
Thanks for bringing that up Theo! I didn't realize that the sequences were in there too. In that case you're right, I think it's best to shelve this again for now, as we have something that's currently working and we initially thought that this might be a "quick win". I'm closing this for now. |
It's not really working well though. Load times of 15+ seconds if there are 15k sequences aren't really acceptable. |
Maybe worth discussing next monday? pinging @chaoran-chen I haven't looked into it that much, but it seems like it might be a good idea to try and redesign it so we can send the metadata withtout the raw sequence data - which is the largest chunk of the data in my understanding. Maybe us 3 (Theo, Cornelius and me) can have a refinement meeting on this ticket and see what would need to get done for this, and then we can decide if the amount of work is something we want to put in now or later. |
Sounds good, I added it to the agenda for next Monday. |
There might be multiple potential causes here:
I've made an issue #3269 |
The issue might be uncompressing the sequence data rather than sending it (we at most send a page's worth of data IIUC) |
resolves #1000
preview URL: https://improve-review-load.loculus.org
Summary
This PR changes it so that all data for the whole page is fetched in a single request. Before, every ReviewCard made a separate request for its own data.
Screenshot
n/A -- no visual changes.
PR Checklist