-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Optimize blob repacking algorithm #348
Copy link
Copy link
Closed
Labels
Description
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.
Reactions are currently unavailable