Skip to content
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

Possible memory optimizations #106

Open
cmdcolin opened this issue Nov 20, 2024 · 0 comments
Open

Possible memory optimizations #106

cmdcolin opened this issue Nov 20, 2024 · 0 comments

Comments

@cmdcolin
Copy link
Collaborator

Some amount of optimization could be done to keep memory usage lower

For example: the each read has a seq field (and others) that are decoded to a string. But strings are 16 bits per letter, because js is utf16

Therefore, a potential memory optimization would be to either (a) use a Uint8Array instead or even (b) decode the 4bit raw encoding from BAM backing buffer on demand

probably (a) would be interesting to try as a first step and see what impact it has on loading larger files with e.g. deep coverage

similar issue in cram-js GMOD/cram-js#135

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant