GMOD / jbrowse-components

Source code for JBrowse 2, a modern React-based genome browser
https://jbrowse.org/jb2
Apache License 2.0
205 stars 61 forks source link

Speed up large displayedRegions sets by converting MST array of Region[] into a types.frozen<IRegion[]> #4423

Closed cmdcolin closed 3 months ago

cmdcolin commented 3 months ago

Pros:

Cons:

You can see benefit by performing a show all regions on our 'many_contigs' test dataset

main https://jbrowse.org/code/jb2/main/?config=test_data%2Fmany_contigs%2Fconfig.json

this branch https://jbrowse.org/code/jb2/large_displayed_regions_set/?config=test_data%2Fmany_contigs%2Fconfig.json

cmdcolin commented 3 months ago

before: 30+ seconds to load after a show all regions after: almost instant with somewhat slow side scrolling

cmdcolin commented 3 months ago

might go ahead with this one...could potentially cause small breakages (for getSnapshot of displayedRegions specifically but code can work around that if needed)