Skip to content

Cache MD5s #626

Closed
Closed

Description

@mb300sd

For large syncs, calculating the MD5s of all the files can take many hours, even though only a few GB has changed. A feature to cache the MD5 based on size+modified time would be very helpful.

Activity

  1. Technifocal commented on Aug 19, 2016

    @Technifocal

    Under what situations? For instance, when I pass --checksum, I am explictly stating, as per the manual:-

    Skip based on checksum & size, not mod-time & size

    Keyword "not mod-time & size". Your implementation would still use mod-time & size.

  2. mb300sd commented on Aug 19, 2016

    @mb300sd
    Author

    Amazon Drive dosen't support mod time, but does store checksums. I have an 8TB sync that takes a day to calculate the checksums for, it would be nice to calculate them once and only update them if the modtime has changed. Right now I'm using --size-only, but that's not useful for disk images so I have to sync those manually.

  3. ncw commented on Aug 25, 2016

    @ncw
    Member

    I quite like the idea of having a cache for a remote, so you could have a cache for the local file system or a cache for the remote filesystem or both.

    It would be tricky to implement though!

  4. mb300sd commented on Aug 25, 2016

    @mb300sd
    Author

    I was thinking of something simple, like if file.ext.md5 exists and it's modtime is newer than file.ext, read it and compare it against the checksum from the remote API instead of calculating it again. If file.ext.md5 dosen't exist or is older than the file modtime, calculate it and store. Or a even single file listing path/md5 would work fine as well, maybe specified in a --checksum-file argument.

    Seems pretty easy to implement, I just haven't been able to wrap my head around Go enough to do it yet.

    The main problem I'm having is that Amazon Drive doesn't support modtime and my sync consists of hundreds of 40+GB files. It looks like a few other remotes calculate and store checksums for you too so the feature could be used on those too.

  5. added this to the milestone on Sep 13, 2016
  6. ivandeex commented on Mar 18, 2021

    @ivandeex
    Member

    Having a hashsum cache for the local filesystem is a useful feature, but it's covered in more details by issue #949

    Remote hashsums are provided instantly by storage providers.
    Instead of caching them we could just add the SUM file support, which is covered by issue #157

    I suggest to close this request in favor of #949 and #157

    cc @ncw

  7. self-assigned this
    on Mar 18, 2021
  8. ncw commented on Mar 23, 2021

    @ncw
    Member

    I think this is covered by #949 and #157 certainly so we should close this one.

    In the long term I want to be able to serialize objects to disk and then to be able to wrap any backend in a vfs cache - this will solve the caching md5 problem.

  9. ivandeex commented on Sep 9, 2021

    @ivandeex
    Member

    Will re-close by merging a patch

  10. modified the milestones: Help Wanted, v1.57 on Sep 9, 2021
  11. modified the milestones: v1.57, v1.58 on Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions