java - Bulk image downloading with optimized way -
this question has answer here:
- a way bulk download images on http java 3 answers
i'm having web site somthing.com developed in spring mvc , 1 client desktop application developed in swing java. want download bulk images server url like.
somthing.com/resourse/webfiles/imgs/1.jpg somthing.com/resourse/webfiles/imgs/2.jpg somthing.com/resourse/webfiles/imgs/3.jpg ... somthing.com/resourse/webfiles/imgs/n.jpg
for testing purpose installed client in several pc's , given hit server avg. takes 20 mins download 1800 imgs/pc.
is there faster way this?
the current code/login steps are...(sorry not giving actual code..)
- requesting image url.
- fetching response in output stream.
- then taking byte , looping write images in physical location.
if have access server, copy files usb thumbdrive , copy them every pc. faster.
actually, assume approach bandwidth between client pc , server th limit, not code.
potentially, multithreading. not think increase throughput more few percent if network bandwidth limit.
you can check if there potential improvement calculation: connection bandwidth, , how compare total transferred bytes in twenty minutes? simplicity, calculate 10 bits 1 byte of real transferred data, take care of protocol overhead.
Comments
Post a Comment