[
https://issues.apache.org/jira/browse/FILEUPLOAD-198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Simone Tripodi updated FILEUPLOAD-198:
--------------------------------------
Fix Version/s: (was: 1.3)
> Add two optional parameters to FileUploadBase.getItemIterator() to pass
> temporary buffers similar to Streams.copy()
> -------------------------------------------------------------------------------------------------------------------
>
> Key: FILEUPLOAD-198
> URL: https://issues.apache.org/jira/browse/FILEUPLOAD-198
> Project: Commons FileUpload
> Issue Type: Improvement
> Affects Versions: 1.2.2
> Environment: Fedora 15. Tomcat 6.
> Reporter: Andreas Girgensohn
> Priority: Minor
>
> When processing a large number of multipart uploads, new byte buffers are
> created for every part of every request. It would be preferable if the
> servlet could reuse those buffers for the next request. Failing that, it
> would already be an improvement if FileUploadBase.findNextItem() could pass
> the same buffer to subsequent calls of MultipartStream.skipPreamble() and
> discardBodyData().
> The item iterator would need two temporary buffers. One would be passed to
> MultipartStream via a new constructor. The other would be passed to
> readBodyData(), discardBodyData(), and skipPreamble() to be passed on to
> Streams.copy().
> This change would require additional signatures for five methods constructors
> and methods but it would reduce memory allocation by a noticeable amount.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira