Skip to content

Review page requests the full sequence data via get-data-to-edit for every card, ~32 MB per page load for mpox #7185

Description

@corneliusroemer

I noticed that the review page loads cards quite slowly even though I have very fast internet (~500MB/s download) - so it must be really bad if you don't have fast internet.

It turns out the submission review page calls get-data-to-edit once per card and that endpoint returns original and aligned sequences even if that information is never used at all on that page: The page itself only shows metadata and the error/warning messages. The sequences are used solely by the dialog behind the DNA button.

For mpox that's roughly 645 kB of uncompressed JSON per entry (197 kb of nucleotides, 54 kb of amino acids), so about 32 MB per page, maybe 8-10 MB after gzip.

I think we chose this implementation out of simplicity 2-3 years ago, reusing an existing backend endpoint. But now, being more mature we might want to rethink and implement something more efficient.

Two possible ways out:

  • We could add something like includeSequences=false to get-data-to-edit and let the sequence dialog fetch the full payload lazily when it opens.
  • We put the metadata, the annotation messages and the file info into the get-sequences list response so the review page needs no per-card request at all. This would be the faster option but a bigger change.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendrelated to the loculus backend componentperformancewebsiteTasks related to the web application

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions