commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From C Rose <>
Subject [FileUpload] Large file uploads are slow
Date Fri, 10 Mar 2006 19:09:57 GMT
Hi all

I'm using commons-fileupload-1.1.jar to handle file uploads to a 
servlet. I expect typical file uploads to be around 40MB is size. 
However, the time taken to upload such files seems quite long.

I have performed some profiling and have found that the call to 
ServletFileUpload.parseRequest() takes about 20 seconds for a 45MB file 
and accounts for over 80% of the time taken to upload the file. This is 
measured on a 600MHz P3 machine (yeah, I know...) with 512MB RAM 
running Linux, Sun's JVM and Tomcat. The machine is acting as both the 
client and the server and is under little additional load.

I am using a DiskFileItemFactory, and the only thing I do to it is 
mandate that the ServletFileUpload object created by the factory does 
not have a limit on the size of the file being uploaded. The transfer is 
going via HTTPS.

Does this upload time seem reasonable?

Is there anything I can do to speed things up?

If parsing the request has to take so long, is it possible to perform 
this task after having returned a response to the client (e.g. start a 
new thread in which to call parseRequest() so that it appears as though 
I've serviced the request fully)---or am I right in thinking that an 
HttpServletRequest object will be 'invalid' after an HttpServletResponse 
is sent to the client?

Thanks in advance


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message