Skip to content
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

More efficient update downloads #9

Closed
mhmd-azeez opened this issue Jan 2, 2017 · 0 comments
Closed

More efficient update downloads #9

mhmd-azeez opened this issue Jan 2, 2017 · 0 comments

Comments

@mhmd-azeez
Copy link
Member

mhmd-azeez commented Jan 2, 2017

Problem

Currently, the updater will try to download new updates every time the app starts up, and each time it downloads the files to a different folder in Windows' Temp folder. This might waste the users data if the app is closed before the download is finished. Because next time the app starts up, everything will be downloaded again from scratch.

So the updater must be smart enough that if some of the files have already been downloaded, it must just continue downloading from where it had stopped the previous time and not start again from the beginning.

Solution

If the updater detects a failed update attempt and the attempt was new (it was for the latest version), then it should try to continue the downloading process from where it had been stopped. These rules decide whether the file will be downloaded again, or not:

  • If the temp file was already downloaded and was of the same size and version as the remote file (the file on the update server), then it will not be downloaded again.
  • If the file was partially downloaded, a new copy will be downloaded from update server.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant