Skip to content

Sync → Rule out an idle pass with a HEAD on the manifest #202

Description

@revett

Problem

Every automatic pass costs two GETs and a full stat walk of the vault, including the overwhelming majority that find nothing changed on either side. At the current five minute poll that is affordable on a desktop. It stops being affordable on a phone, where it is battery and cellular data spent to learn nothing.

Behaviour

  • HEAD the manifest and compare the ETag against the last completed pass
  • When it matches and no vault event has fired since, abandon the pass before taking a snapshot
  • Drop POLL_INTERVAL_MS to 60 seconds, which the cheaper tick makes affordable
  • Add a full reconcile every 30 minutes that ignores the probe, since a watcher trusted absolutely is a watcher that will eventually lose a file

headObject already exists on StorageClient. The sentinel is written once and never rewritten, so it is never what changed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueIdeal tasks for newcomers and contributors

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions