-
Notifications
You must be signed in to change notification settings - Fork 61
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
Lazy-load assemblies on demand instead of all at app startup #3287
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
the
needs label triage
Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal)
label
Oct 24, 2022
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
Oct 24, 2022
cmdcolin
force-pushed
the
lazy_assembly
branch
from
October 25, 2022 08:01
6878402
to
895c7bc
Compare
cmdcolin
force-pushed
the
lazy_assembly
branch
from
October 25, 2022 08:18
895c7bc
to
9f7e1ac
Compare
Codecov Report
@@ Coverage Diff @@
## main #3287 +/- ##
==========================================
+ Coverage 59.40% 59.70% +0.29%
==========================================
Files 679 675 -4
Lines 28868 28735 -133
Branches 7047 6981 -66
==========================================
+ Hits 17150 17157 +7
+ Misses 11441 11334 -107
+ Partials 277 244 -33
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
cmdcolin
force-pushed
the
lazy_assembly
branch
from
October 25, 2022 16:51
25bb973
to
7d712bc
Compare
cmdcolin
force-pushed
the
lazy_assembly
branch
2 times, most recently
from
October 25, 2022 18:05
c1c0d67
to
c540ad3
Compare
cmdcolin
force-pushed
the
lazy_assembly
branch
5 times, most recently
from
October 26, 2022 02:09
07d648f
to
5a888b0
Compare
cmdcolin
force-pushed
the
lazy_assembly
branch
from
October 26, 2022 04:57
5a888b0
to
d13c539
Compare
managed to pass all tests now, should be ready to go :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current code for jbrowse-web/jbrowse-desktop loads ALL configured assemblies and their refnames on startup e.g. fetches their "fai" file or similar on startup. While these fai files are not often too large (unless assembly is fragmented, then can be megabytes, or if it is twobit, which has very poor access pattern with a range request for each refname in the file), but even for small ones, it is a bit of a network stampede. A user requested loading 1000 assemblies in gitter. This PR helps by lazily loading assemblies as the data is requested, either via assemblyManager.get('asm') or assemblyManager.waitForAssembly('asm')
The get() is a little funky since it is a "view" that kicks off an async action to start the loading even though it returns synchronously, but code that uses assemblyManager.get should know about this type of reactivity
One change for this is that LGV.navToLocString is now async. This is needed to handle locstrings that contain an assembly name which we test for, e.g. {volvox2}:ctgA:1-100
Some tests are updated accordingly to not immediately check the result of navToLocString
Fix #1735