Re: pack-object's try_delta fast path for v2 trees?

2013-10-14 Thread Jeff King
On Sat, Oct 12, 2013 at 10:42:17AM +0700, Nguyen Thai Ngoc Duy wrote: 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

Re: pack-object's try_delta fast path for v2 trees?

2013-10-14 Thread Duy Nguyen
On Tue, Oct 15, 2013 at 7:19 AM, Jeff King p...@peff.net wrote: On Sat, Oct 12, 2013 at 10:42:17AM +0700, Nguyen Thai Ngoc Duy wrote: 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

Re: pack-object's try_delta fast path for v2 trees?

2013-10-14 Thread Jeff King
On Tue, Oct 15, 2013 at 07:49:57AM +0700, Nguyen Thai Ngoc Duy wrote: I see this as pack-objects peformance improvements only. If we could make pack-objects run like 10% faster (even only with -adf), then it may be worth trying. The 10% is a total guess though as I haven't checked how much

Re: pack-object's try_delta fast path for v2 trees?

2013-10-14 Thread Nicolas Pitre
On Mon, 14 Oct 2013, Jeff King wrote: On Sat, Oct 12, 2013 at 10:42:17AM +0700, Nguyen Thai Ngoc Duy wrote: 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

Re: pack-object's try_delta fast path for v2 trees?

2013-10-14 Thread Jeff King
On Mon, Oct 14, 2013 at 09:45:12PM -0400, Nicolas Pitre wrote: No, as far as I know, it is a novel idea. When we were discussing commit caching a while back, Shawn suggested slicing trees on boundaries and store delta instructions that were pure change this entry, add this entry, and

Re: pack-object's try_delta fast path for v2 trees?

2013-10-14 Thread Nicolas Pitre
On Mon, 14 Oct 2013, Jeff King wrote: By the way, I'm sorry I haven't looked more carefully at the packv4 patches yet. I am excited about it, but I've just got a long queue of other things (and because it's big and challenging, it's easy to put off). ;-) While I consider the format pretty

Re: pack-object's try_delta fast path for v2 trees?

2013-10-12 Thread Nicolas Pitre
On Sat, 12 Oct 2013, Duy Nguyen wrote: 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

pack-object's try_delta fast path for v2 trees?

2013-10-11 Thread Duy Nguyen
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