Skip to content

Instantly share code, notes, and snippets.

@bibarsov
Created April 2, 2019 14:17
Show Gist options
  • Save bibarsov/8ebe8842d573afad11c0521afb144a6b to your computer and use it in GitHub Desktop.
Save bibarsov/8ebe8842d573afad11c0521afb144a6b to your computer and use it in GitHub Desktop.
public static void main(String[] args) {
File file = new File("/Users/tbibarsov/Downloads/1_000_000_Contacts.xlsx");
int[] arr = {100, 500, 1_000, 5_000, 10_000, 25_000, 50_000, 100_000, 500_000, 1_000_000, -1};
for (int i : arr) {
long s = System.currentTimeMillis();
RowIterator excelRowIterator = getExcelRowIterator(
StreamingReader.builder()
.sstCacheSize(i)
.open(file)
);
while (excelRowIterator.hasNext()) {
excelRowIterator.next();
}
excelRowIterator.close();
long l = System.currentTimeMillis() - s;
System.out.println("sstCache: " + i + " , took " + (l / 1000L) + " sec");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment