Improve GzipReader#gets performance. #739

Merged
merged 1 commit into from May 17, 2013

Projects

None yet

3 participants

@grddev
Contributor
grddev commented May 15, 2013

Previously checked the whole line for the separator after each character
read. The new version instead just checks whether the line read so far
ends with the separator.

Note that the current version of ByteList#startsWith/endsWith assumes
the index and byte list arguments are valid, which means we must not
call the method before the line is long enough.

@grddev grddev Improve GzipReader#gets performance.
Previously checked the whole line for the separator after each character
read. The new version instead just checks whether the line read so far
ends with the separator.

Note that the current version of ByteList#startsWith/endsWith assumes
the index and byte list arguments are valid, which means we must not
call the method before the line is long enough.
adc4049
@jrubyci jrubyci merged commit adc4049 into jruby:master May 17, 2013

1 check failed

default The Travis CI build failed
Details
@headius
Member
headius commented May 17, 2013

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment