• Post Reply Bookmark Topic Watch Topic
  • New Topic

Slow File Download

 
Tom Simmons
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Afternoon All

This may not strictly be a JSP issue.

I have a JSP app, it has a servlet that handles downloading a file, there is various piddling around that happens before the actual download - it's not important other than to say the result is a file object called downloadFile...



The resulting download seems very slow to me, particularly when compared with FTP of the same file across the same network form the same server to the same client.

I wondered if the buffering was an issue, so I replace the last 4 lines with...



It made not a jot of difference.

So now I'm a little stumped and I turn to you wonderful folk for some input:

1.
Would you expect much difference between HTTP and FTP? One other fact here, upload of the same file file takes about 10 seconds, download about 40 using HTTP, I don't have the figures for FTP at hand I'm afraid.

2.
Is the above approach (either or) correct or is there a better way of doing this?

3.
(Not really important) Would people generally stick BufferedInputStream/FileInputStream, or would you move to the NIO approach? If so how would that be achieved? I've only found this question asked once, the only reply was pretty poor and seemed to suggest they wouldn't use NIO.


Thanks

Tom
 
Tom Simmons
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No one get any thoughts on this at all?

Tom
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!