summaryrefslogtreecommitdiff
path: root/annotations/generate_annotated_java_files.py
diff options
context:
space:
mode:
authorPrzemyslaw Szczepaniak <pszczepaniak@google.com>2017-09-12 10:05:39 +0100
committerPrzemyslaw Szczepaniak <pszczepaniak@google.com>2017-09-27 13:06:58 +0100
commite1754ddc8656fa8b2c1a0ec828125820a190fd13 (patch)
treefd59f0b9e28e1a239acf6a1f2ed6db0a0df58a3b /annotations/generate_annotated_java_files.py
parent8ff194011cfaae5d532e04c0ee536e4c43addb09 (diff)
Increase ZipFile read buffers size to 64k
Fixes performance regression introduced in Android N. Increased size of buffer for Inflater in ZipFile.getInputStream from 8k to 64k. Replaced temp stack in bufferZipFile_read with GetByteArrayElements. ZipFileReadBenchmark results on pixel device: Without the change: Experiment {instrument=runtime, benchmarkMethod=timeZipFileRead, vm=default, parameters={readBufferSize=1024}} runtime(ns): min=11591794.71, 1st qu.=11591794.71, median=11591794.71, mean=11591794.71, 3rd qu.=11591794.71, max=11591794.71 Experiment {instrument=runtime, benchmarkMethod=timeZipFileRead, vm=default, parameters={readBufferSize=16384}} runtime(ns): min=4913842.09, 1st qu.=4913842.09, median=4913842.09, mean=4913842.09, 3rd qu.=4913842.09, max=4913842.09 Experiment {instrument=runtime, benchmarkMethod=timeZipFileRead, vm=default, parameters={readBufferSize=65536}} runtime(ns): min=4888673.69, 1st qu.=4888673.69, median=4888673.69, mean=4888673.69, 3rd qu.=4888673.69, max=4888673.69 With the change: Experiment {instrument=runtime, benchmarkMethod=timeZipFileRead, vm=default, parameters={readBufferSize=1024}} runtime(ns): min=11415217.04, 1st qu.=11415217.04, median=11415217.04, mean=11415217.04, 3rd qu.=11415217.04, max=11415217.04 Experiment {instrument=runtime, benchmarkMethod=timeZipFileRead, vm=default, parameters={readBufferSize=16384}} runtime(ns): min=2690763.53, 1st qu.=2690763.53, median=2690763.53, mean=2690763.53, 3rd qu.=2690763.53, max=2690763.53 Experiment {instrument=runtime, benchmarkMethod=timeZipFileRead, vm=default, parameters={readBufferSize=65536}} runtime(ns): min=2202639.03, 1st qu.=2202639.03, median=2202639.03, mean=2202639.03, 3rd qu.=2202639.03, max=2202639.03 Test: vogar run of test in *.java.util.zip packages Bug: 65491407 Change-Id: I7734dde9e6e02b1fbff7209c1256a16ded1654e6
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions