Skip to content

Optimize blob repacking algorithm #348

@fd0

Description

@fd0

The current blob repacking code basically works like this:

  • find all unused blobs
  • find the pack files for these blobs
  • copy all blobs in those pack files into new pack files
  • update the index
  • remove the (now unused) pack files and the old index files

This is not the most efficient way to do it: If just one single small blob in a large pack file is unused, the whole pack file is rewritten. Optimize the algorithm so that packs are only repacked when e.g. at least 10 or 20% of the pack's size is occupied by unused blobs.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions