bam-js icon indicating copy to clipboard operation
bam-js copied to clipboard

Experimental: remove chunk cache

Open cmdcolin opened this issue 8 months ago • 0 comments

This is an experimental attempt at removing caching from the bam-js library. The cache size is basically uncontrolled and can result in essentially a memory leak. Additionally, in normal jbrowse style usage of the bam-js library, there are many cache misses, and this makes the benefit of the cache somewhat marginal

A solution should be made that either

a) just removes cache b) improves cache hit rate, and controls cache size

this PR is (a) but is just for experimental purposes right now

here is a picture that shows a pattern of requests from a single page load

Screenshot 2025-03-15 at 2 40 18 PM(3)

the columns are individual requests to the bam-js library. note that these trigger parsing of many overlapping regions particularly for long reads, of the bam file itself, even though the requests themselves, e.g. for the static blocks, are non-overlapping.

cmdcolin avatar Mar 15 '25 18:03 cmdcolin