You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Simone Tripodi (JIRA)" <ji...@apache.org> on 2013/03/07 12:06:14 UTC

[jira] [Updated] (FILEUPLOAD-198) Add two optional parameters to FileUploadBase.getItemIterator() to pass temporary buffers similar to Streams.copy()

     [ 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