-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement way to restore DownloadWorker from file #1
Comments
You are using the Multi-threaded-downloader, which can be nice, but I don't like it at all, I prefer something like https://github.com/zenflow/node-fast-download. This basically check if file already in the destination folder and get the file lenght, so on restore you only have to read the filesize and make the call, you not writing everytime a metafile, so processor speed must be better and you have not to check if file contains X data but not saved in meta file, etc... It's only my view point and a suggestion. |
Thanks for your suggestion! rapid-downloader already came with single-thread mode and multi-thread mode, which can be switched easily by option object. |
Maybe the best solution is not let the user change the threads quantity... Which is contrarily to my original idea about multi-thread downloader, but have sense with this problem. Another solution can be split more the file, for example, split in 100MB (parametizable size) parts and every chunk download up to 100MB, with this you can join files early and if downlaod stopped and threads changed, you simple have to put more workers to download. I hope you found a nice and clean way to do it. |
By implement this will enable more use case of the library:
Idea:
P/s: only PartialDownloadSession is compatible with this method
The text was updated successfully, but these errors were encountered: