Skip to content

[BUG] Fixed gzip files being loaded in memory and added unit tests - #47

Open
Ahmottie wants to merge 1 commit into
CSBiology:mainfrom
Ahmottie:fix/46-bug-gzip
Open

Ahmottie wants to merge 1 commit into
CSBiology:mainfrom
Ahmottie:fix/46-bug-gzip

Conversation

@Ahmottie

Copy link
Copy Markdown

Problem

FileIO.readFileGZip copied the entire decompressed file into memory before returning the first line. Memory use grew with the uncompressed file size, and files larger than 2 GB uncompressed failed with System.IO.IOException: Stream was too long.

Verification on real data

SRR001666_1.fastq.gz from ENA. Normal size and concatenated three times (2.77 GB uncompressed, 84,572,016 lines):

Memory before reading: 240 MB
First line after 0.0 s, peak memory 241 MB
Read 84572016 lines in 18.6 s, peak memory 786 MB

- Read libes directly instead of loading it in the memorry
- Added unit gzip tests for `FileIO`

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant