samtools/htsjdk — pull request #4 by BeatWolf (2014-05-13 09:40:34+00:00)
Title: AbstractBAMFileIndex.query array list optimization

I was having some performance problems when using getSpanOverlapping. I identified one of the issues to be the creation of many unneeded empty Arraylists in the query function. This patch only creates an arraylist when it is actually needed, otherwise the much faster Collections.emptyList() is used.
In my usecase i saw a 40% speedup, this may be different on different datasets, but there should be no reason for any performance decrease in any situation.