Previously, hg repack would undelta every entry, then redelta it. If the delta
base node was the same before and after (which should be common), this resulted
in a lot of work and made repacking every entry in a chain an n^2 operation.
Let's use the new getdelta API to reuse the delta when possible.
Details
- Reviewers
 quark - Group Reviewers
 Restricted Project - Commits
 - rFBHGX8cb19938d4a7: repack: reuse deltas when possible
 
Diff Detail
- Repository
 - rFBHGX Facebook Mercurial Extensions
 - Lint
 Lint Skipped - Unit
 Unit Tests Skipped 
Event Timeline
| remotefilelog/repack.py | ||
|---|---|---|
| 625 | Is the "deltabasename != filename" and "size is None" test necessary?  | |
| remotefilelog/repack.py | ||
|---|---|---|
| 625 | The pack format supports delta's against revision with a different name, but repack currently does not. So if the pack has a delta from a different name, we should not try to reuse it. The size is None test is just because Phil made a change to use size to improve delta choice during repack, and it relies on the size metadata being filled in during a repack. So I'm assuming it is advantageous to do the onetime work here to get the size, so all future packs will be more compact.  | |
Is the "deltabasename != filename" and "size is None" test necessary?