bgzip reindex performance
@jkbonfield is already working on this.
Since May 23, 2016.
Assessment
This issue has not been assessed yet.
Description
Hi,
I have noticed that bgzip's reindex functionally seem slower that is necessary.
The index in made up of the uncompressed and compressed offsets for each bgzip block in a file possibly excluding the final block. I think all this information is contained within the bgzip header and footer i.e. the BSIZE feild and the ISIZE field (page 11: https://samtools.github.io/hts-specs/SAMv1.pdf)
However the current implementation is passing the entire file block-wize to bgzf_read() in bgzf.c which I think is decompressing the file to rebuild the index.
Is there any reason why the reindexing functionality can be implemented by just seeking through the file and just pulling out the BSIZE and ISIZE fields?
By the way I am interested in reindex performance due to another issued I raised in parallel to this:
https://github.com/samtools/htslib/issues/377
- Dominant language
- C
- Stars
- 950
- Forks
- 475
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 11
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from samtools/htslib
-
Difficulty 3/5 1-2 days Newbie friendliness 74/100
-
Difficulty 3/5 1-2 days Newbie friendliness 76/100
-
tabix performance Open
Similar issues
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·
-
bug Self Built Image SNAPSHOT Supported Device target/ramips
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100