Replaced a useless getInt with a skipInt to remove 1/4 of the initial seek time in the BAM Index.
This commit is contained in:
parent
62eaffdf0a
commit
5e66109268
|
|
@ -282,7 +282,7 @@ public class GATKBAMIndex {
|
|||
final int nBins = readInteger();
|
||||
// System.out.println("# nBins: " + nBins);
|
||||
for (int j = 0; j < nBins; j++) {
|
||||
final int bin = readInteger();
|
||||
skipInteger();
|
||||
final int nChunks = readInteger();
|
||||
// System.out.println("# bin[" + j + "] = " + bin + ", nChunks = " + nChunks);
|
||||
skipBytes(16 * nChunks);
|
||||
|
|
@ -334,6 +334,10 @@ public class GATKBAMIndex {
|
|||
return buffer.getInt();
|
||||
}
|
||||
|
||||
private void skipInteger() {
|
||||
skipBytes(INT_SIZE_IN_BYTES);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads an array of <count> longs from the file channel, returning the results as an array.
|
||||
* @param count Number of longs to read.
|
||||
|
|
|
|||
Loading…
Reference in New Issue