New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WARCRecordFormat use ByteBuffer instead of ByteArrayOutputStream #561

jnioche opened this Issue Apr 11, 2018 · 0 comments


None yet
1 participant

jnioche commented Apr 11, 2018

ByteArrayOutputStream creates intermediates copies of the array as it expands its capacity as well as a final array copy to get the byte array. Since we know in advance the length of the byte[] we can use ByteBuffer to improve the performance.

@jnioche jnioche added this to the 1.9 milestone Apr 11, 2018

@jnioche jnioche closed this in bf289a7 Apr 11, 2018

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