Skip to content

Commit

Permalink
MemoryDataStore: Efficiently multiply by 1.25
Browse files Browse the repository at this point in the history
  • Loading branch information
Lanchon authored and JesusFreke committed Jun 13, 2018
1 parent f1c1162 commit 6389687
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -65,7 +65,7 @@ private void growBufferIfNeeded(int minSize) {
}

protected int getNewBufferSize(int currentSize, int newMinSize) {
return (int)(newMinSize * 1.2);
return newMinSize + (newMinSize >> 2);
}

@Nonnull @Override public InputStream readAt(final int offset) {
Expand Down

0 comments on commit 6389687

Please sign in to comment.