You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "David Georg Reichelt (JIRA)" <ji...@apache.org> on 2019/03/18 09:53:01 UTC

[jira] [Created] (FILEUPLOAD-296) Speed Up Parsing

David Georg Reichelt created FILEUPLOAD-296:
-----------------------------------------------

             Summary: Speed Up Parsing
                 Key: FILEUPLOAD-296
                 URL: https://issues.apache.org/jira/browse/FILEUPLOAD-296
             Project: Commons FileUpload
          Issue Type: Bug
    Affects Versions: Nightly Builds, 2.x
            Reporter: David Georg Reichelt


In 4ed6e923cb2033272fcb993978d69e325990a5aa, FileUploadBase.parseRequest was changed: Instead of using a buffer declared there and passing it to Streams.copy(InputStream, OutputStream , boolean, byte[]), Streams.copy(InputStream, OutputStream , boolean) was used.

This slows down the parsing by ~ 10%: Since in every iteration of the loop a new buffer is created in Streams.copy, additional effort is created. I therefore recommend to create a buffer and reuse it.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)