pack-object's try_delta fast path for v2 trees?
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Oct 12, 2013, 03:42 UTC
- Message-ID
- <CACsJy8Behb7PW=pFjH=wpjfHjUiyCo8n_ER+KyzcBwCzpyG6pg@mail.gmail.com>
Hi,
Just wondering if this has been considered and dropped before. Currently we use try_delta() for every object including trees. But trees are special. All tree entries must be unique and sorted. That helps simplify diff algorithm, as demonstrated by diff_tree() and pv4_encode_tree(). A quick and dirty test with test-delta shows that tree_diff only needs half the time of diff_delta(). As trees account for like half the objects in a repo, speeding up delta search might help performance, I think.
-- Duy