Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFixed leaky buffer when streaming. #243
Open
Conversation
codecov-io
commented
Jun 15, 2019
•
Codecov Report
@@ Coverage Diff @@
## master #243 +/- ##
=========================================
+ Coverage 68.46% 68.5% +0.04%
=========================================
Files 107 107
Lines 7335 7338 +3
Branches 1388 1389 +1
=========================================
+ Hits 5022 5027 +5
+ Misses 1867 1866 -1
+ Partials 446 445 -1
Continue to review full report at Codecov.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
svobol13 commentedJun 15, 2019
Reworked a way how internal buffer size increases when streaming. The new way changes both
whenandhowit increases size.When: Whenever current buffer size is fully utilized AND autoresizing is enabled.
How: It increases buffer size with configured absolute number of bytes instead of doubling the capacity.
New API: Added new factory method
parse(InputStream in, int bufSize, int autoExpandBufferStep)that creates Iterator with posibility to control how autoresizing works. Set 0 to disable, set 5 to increase buffer size of 5 bytes everytime we hit end.Backward compatibility: Factory
parse(InputStream in, int bufSize)was changed with respect to previous setting. First increase of buffer size is exactly same as it was in pass though any subsequent increase is same size as first one in contrast to previous behaviour (it was growing exponentially).