Giter VIP home page Giter VIP logo

Comments (5)

TheAssassin avatar TheAssassin commented on June 4, 2024

At the moment, the .zsync file's contents are not cached. This is not a problem at the moment, the file is downloaded once for every update check (performed only once), and while running an update. For the actual update, that shouldn't be a problem either. However when requesting the value before performing an update, and in the rare case that the remote file is updated between requesting the value and running the update (yes, I know, that's probably quite rare, but might occur regularly with projects where builds are running frequently due to many commits being made), the values might differ, hence making the progress indication imprecise.

Therefore, the .zsync file contents should either be cached by whatever is occurs first (running the update or requesting the file size), or, alternatively, the method should be written in the error handling style established in the rest of the library, and return false until the value is available (i.e., the update has been started, and the .zsync file has been parsed). The latter could be extended to caching the value of an update check as well, and furthermore, the .zsync file could be downloaded and the value populated before either an update check is performed or the update is started.

from appimageupdate.

probonopd avatar probonopd commented on June 4, 2024

Are you talking about showing the size of the update download (the size of the delta) prior to having started the update process? If this proves cumbersome in the zsync architecture (which it probably is) then we should not do that and only show the download filesize once the updating process has started, at least for now.

from appimageupdate.

TheAssassin avatar TheAssassin commented on June 4, 2024

I decided what to do: the value will be available as soon as the update process itself has downloaded the .zsync file for its purposes, prior to that, the value won't be available, similar to the progress bar.

from appimageupdate.

probonopd avatar probonopd commented on June 4, 2024

The zsync file can't contain the information how much data really needs to be downloaded, since it's the same zsync file for all users whereas the size of the download is highly dependent on what the user already has available locally. So The total amount of data will only be available shortly before the download starts. What we could show, in addiition, though, is the total filesize on disk of the file after the update.

from appimageupdate.

TheAssassin avatar TheAssassin commented on June 4, 2024

Implemented in f866563.

from appimageupdate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.