Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: try harder to operate on new data (#124)
* perf: avoid rereading the buffer from the start for noncompressed requests Instead of rereading the buffer from the beginning start from where we left off with the previous failed item. * perf: reuse gzip reader and avoid rereading buffer for compressed request Similar to the other change for uncompressed requests, do not reread the buffer from the beginning and start where we left off. The gzip reader is being reused and more data is read lazily. * perf: try harder to operate on new data With gzip the buffer can grow a lot, leading to a lot more work when counting newlines. To improve performance we discard everything up to the previous document when preparing the buffer for the next document. * refactor: reduce complexity and reuse the buffer more * refactor: remove endIdx optimization * refactor: readd first loop condition
- Loading branch information