GitHub user brettlounsbury opened a pull request: https://github.com/apache/commons-io/pull/22
[IO-515] Add constructors that allow the initial size of the in memory buffer Add constructors that allow the initial size of the in memory buffer to be set to a value other than the default value in ByteArrayOutputStream. The current default is 32B which can have large performance impact if the threshold is large enough due to multiple array doubling iterations. As an example, to buffer 1MB the array would double 15 times and would create approximately 1MB of garbage arrays in addition to the 1MB of buffer at the end. https://issues.apache.org/jira/browse/IO-515 You can merge this pull request into a Git repository by running: $ git pull https://github.com/brettlounsbury/commons-io master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/commons-io/pull/22.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #22 ---- commit 112d6c02a4c0d3fe9caa658505f31da3908b1467 Author: Brett Lounsbury <bre...@amazon.com> Date: 2016-09-27T19:58:21Z Add constructors that allow the initial size of the in memory buffer to be set to a value other than the default value in ByteArrayOutputStream. The current default is 32B which can have large performance impact if the threshold is large enough due to multiple array doubling iterations. As an example, to buffer 1MB the array would double 15 times and would create approximately 1MB of garbage arrays in addition to the 1MB of buffer at the end. ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org