commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Georg Reichelt (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FILEUPLOAD-296) Speed Up Parsing
Date Mon, 18 Mar 2019 09:53:01 GMT
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)

Mime
View raw message