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

Improve unzip performance #56

Closed
cmdcolin opened this issue Mar 15, 2022 · 3 comments
Closed

Improve unzip performance #56

cmdcolin opened this issue Mar 15, 2022 · 3 comments

Comments

@cmdcolin
Copy link
Contributor

  1. use inflateRaw instead of inflate...skip crc32 checks which are computationally expensive
  2. use Uint8Array instead of Buffer or otherwise make the unzip more memory efficient somehow? it is basically doing "Major GC" the entire time, see screenshot. see igvutils unbgzip(MIT licensed) https://github.com/igvteam/igv-utils/blob/master/src/bgzf.js#L30

Screenshot from 2022-03-15 10-33-41

@cmdcolin
Copy link
Contributor Author

note that the unzip performance causes our jb2profiling test on high coverage short reads to timeout

@cmdcolin
Copy link
Contributor Author

(orange blocks are major gc)

@cmdcolin
Copy link
Contributor Author

Fixed by #57, might be some small additional improvements if raw is considered and the final Buffer.from(uint8array) in the unzips appears to do a copy

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