]> gitweb.fperrin.net Git - DictionaryPC.git/commit
Add read-ahead buffer to decompress in parallel.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sat, 14 Oct 2017 17:55:06 +0000 (19:55 +0200)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sat, 14 Oct 2017 17:55:06 +0000 (19:55 +0200)
commitb60bc4096cf591206cc7ad2e235b88030a9ee65f
tree9a956569b7ef8953597d30597a1ae02796a750b7
parentee1dbfb669462305a1c07e4d804a90af79f5d39f
Add read-ahead buffer to decompress in parallel.

Allows using more than one CPU core for a good speedup.
Benchmarks:
Uncompressed files:    196.29 CPU, 5:18.34 wall clock time
xz-compressed, before: 299.19 CPU, 5:21.85 wall clock time
xz-compressed, after:  308.96 CPU, 3:29.60 wall clock time

(first was I/O limited, second was CPU-limited, now it is
almost only limited by CPU-time for XML parsing)
src/com/hughes/android/dictionary/engine/ReadAheadBuffer.java [new file with mode: 0644]
src/com/hughes/android/dictionary/engine/WiktionarySplitter.java