Skip to content

downloader.copyLocal should use Clonefile on macOS #1411

Closed
@jandubois

Description

@jandubois

Description

Most of the copies made by downloader will remain identical copies of files in the cache (e.g. basedisk), and the files are often quite large.

On macOS (with apfs) using unix.Clonefile instead of fs.CopyFile will be much faster and save disk space, as the copy will point to the same datablocks as the source until they are modified (via "Copy on Write"). Only file metadata is copied.

Clonefile was added to x/sys/unix in golang/sys@2334cc1

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions