kevva / download

Download and extract files
MIT License
1.28k stars 200 forks source link

Extract and download in parallel #40

Closed piranna closed 9 years ago

piranna commented 9 years ago

When downloading several files, currently it's being waited to finish all of them previously to decompress them. They should be done at the same time, so when one finish to download it can start to decompress while other start downloading.

kevva commented 9 years ago

Good idea, I'll try to figure something out.

piranna commented 9 years ago

Maybe it can be done by adding the extract tasks to a queue so only one of them is extracting at each time. Unluckily async.js doesn't allow to add tasks to already running executions... :-(

kevva commented 9 years ago

Yeah, we'd probably need an extract event, but it seems kinda overkill to add that to all the decompress plugins just because of this module. Btw, we're not using the async package, but each-async.

kevva commented 9 years ago

Fixed by https://github.com/kevva/download/commit/bf0d278cbf5b76ce4b3ef0db3891297aa0b38df8.

piranna commented 9 years ago

Thank you :-)