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

Fix performance regression since v2.14.0 in assembly loading #4553

Closed cmdcolin closed 2 weeks ago

cmdcolin commented 2 weeks ago

v2.14.0 introduced the NCBI sequence report adapter (xref https://github.com/GMOD/jbrowse-components/pull/4516/files) which allows e.g. NC_000001.11 to be displayed as chr1 in the UI)

Unfortunately there was an unexpected performance regression, due to accessing a mst observable outside of an observable context, causing it to be re-calculated for every invocation which was once per refname so it was a big slowdown

can see that loading a human FASTA takes:

before, 8000milliseconds (8s): image

after, 10ms: image