samtools/htsjdk — pull request #78 by d-cameron (2014-08-01 11:23:26+00:00)
Title: Asynchronous IO performance enhancements

Bug fix: Removed 2s idle thread delay when closing asynchronous SAM writer.

Asynchronous IO is currently only performed when writing records. For my use case of reading a SAM/BAM and writing a subset of records to multiple files, buffer asynchronously parsing of the input bam on a background thread improved performance (and CPU usage) by ~30%.

In addition to the above, basic performance profiling indicates that the performance of BlockingQueue of AbstractAsyncWriter.queue can be improved by batching of records before handing over to the consumer thread.

Should I incorporate an enhancement adding input parsing async capability and/or output buffering into this pull request?