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

Avoid calculating bpToPx on every frame of synteny side scroll #3442

Merged
merged 16 commits into from
Jan 9, 2023

Conversation

cmdcolin
Copy link
Collaborator

@cmdcolin cmdcolin commented Jan 7, 2023

This is another refactor adding onto the base branch at #3441

This calculates all bpToPx in a useMemo, which is only reactive to bpPerPx changes. This greatly reduces amount of work needing to be done per-frame during synteny rendering. This PR is not done yet, but demonstrates good speedups with e.g. 10,000 plus lines being plotted which is common in whole genome overviews

Also has a couple riders including avoiding a dead state tree node found in side scrolling a plain lgv with svgfeatures by snapshotting region in serversiderenderedblock

@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Jan 7, 2023
@cmdcolin cmdcolin added enhancement New feature or request and removed needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) labels Jan 8, 2023
@codecov
Copy link

codecov bot commented Jan 8, 2023

Codecov Report

Merging #3442 (f9057ab) into polyline (5042a9f) will decrease coverage by 0.01%.
The diff coverage is 64.18%.

@@             Coverage Diff              @@
##           polyline    #3442      +/-   ##
============================================
- Coverage     61.31%   61.29%   -0.02%     
============================================
  Files           823      818       -5     
  Lines         29556    29523      -33     
  Branches       7095     7064      -31     
============================================
- Hits          18121    18096      -25     
+ Misses        11266    11258       -8     
  Partials        169      169              
Impacted Files Coverage Δ
...view/src/LinearComparativeDisplay/configSchemaF.ts 100.00% <ø> (ø)
...arative-view/src/LinearComparativeDisplay/index.ts 66.66% <0.00%> (-33.34%) ⬇️
...ive-view/src/LinearSyntenyDisplay/configSchemaF.ts 100.00% <ø> (ø)
...comparative-view/src/LinearSyntenyDisplay/index.ts 100.00% <ø> (ø)
...ar-comparative-view/src/LinearSyntenyView/model.ts 35.29% <ø> (ø)
plugins/linear-comparative-view/src/index.tsx 87.50% <ø> (-0.74%) ⬇️
...aseLinearDisplay/models/serverSideRenderedBlock.ts 95.93% <ø> (ø)
...ircular-genome-view/src/createModel/createModel.ts 37.50% <ø> (ø)
...-linear-genome-view/src/createModel/createModel.ts 38.46% <ø> (ø)
...LinearSyntenyDisplay/components/SyntenyTooltip.tsx 10.00% <10.00%> (ø)
... and 16 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Jan 8, 2023

this PR now fully removes the concept of a "linear synteny renderer", doing all logic on the display

also uses autoruns to draw to the canvas instead of trying to interface the useEffect with the observables (this technique was used successfully for the alignment arcs/read cloud work)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant