Significantly improve LongEncodingStrategy.AUTO build performance (#4215)

* Significantly improve LongEncodingStrategy.AUTO build performance

* use numInserted instead of tempIn.available

* fix bug
This commit is contained in:
kaijianding 2017-04-27 20:11:07 +08:00 committed by Roman Leventov
parent 13143f9376
commit c47cfed0ec
1 changed files with 3 additions and 1 deletions

View File

@ -131,8 +131,10 @@ public class IntermediateLongSupplierSerializer implements LongSupplierSerialize
try (DataInputStream tempIn = new DataInputStream(new BufferedInputStream(ioPeon.makeInputStream(tempFile)))) {
delegate.open();
while (tempIn.available() > 0) {
int available = numInserted;
while (available > 0) {
delegate.add(tempIn.readLong());
available--;
}
}
}