-
Notifications
You must be signed in to change notification settings - Fork 60
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
Conversation
Codecov Report
@@ 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
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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) |
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