Why Firefox is four times faster to download zip file then my own Java program?
Joined: Jul 25, 2009
I tried using regular IO or NIO but Firefox always beats it by being about 4 times faster. Is there something special they are using?
For example, I tried downloading eclipse distributions and needed about 40 minutes for like 360 MB and Firefox did in 10 minutes.
I will post the code, if requested, but hope this is something beyond my code.
Let's see your loop for actually reading/ writing, and maybe something will jump out at us. I suspect some of that speed comes from using multiple buffers in rotation, and reading and writing from dedicated threads, but there are some very basic things -- using a large - enough buffer, for example -- that can make a difference.
Hi guys, I have tried to break it up into four threads, as Rob suggested, by I don't know multi-threading very well, so what I get is I can see that 4 files are being created but only one file is being populated with data. After that is done the application terminates and 3 other files don't contain any data.
Here's my downloader class.