Skip to content

Avoid repeated work when displaying long proteins - #368

Open
jkhales wants to merge 1 commit into
Lattice-Automation:developfrom
jkhales:fix/protein-row-rendering
Open

jkhales wants to merge 1 commit into
Lattice-Automation:developfrom
jkhales:fix/protein-row-rendering

Conversation

@jkhales

@jkhales jkhales commented Sep 10, 2026

Copy link
Copy Markdown

Displaying long proteins is slow because each visible row processes the entire protein sequence, including residues it never draws.

This limits non-wrapping translations to the residues in the current row and reuses their click-target IDs when redrawing. A row showing 40 residues from a 600-residue protein now processes 40 instead of 600.

@guzmanvig

Copy link
Copy Markdown
Collaborator

Hi

Thanks for submitting this. Could you share an example video and/or code of the issue you were experiencing and that this PR solves?

Thanks

@jkhales

jkhales commented Sep 19, 2026

Copy link
Copy Markdown
Author

Hi @guzmanvig — sure! Recording below. It's from a side-by-side demo of published seqviz@3.10.24 (left) vs a build of this branch (right), both rendering the same sequence.

Load time is marginally faster from the PR, but the difference is most noticeable while scrolling. Same mechanism speeds them both up.
Happy to share the demo page itself (a single HTML file comparing the two builds) if you'd like to run it locally.

Screen.Recording.2026-09-19.at.12.20.59.PM.mov

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.

2 participants