Re: [PATCH v2 4/4] unpack-trees: cheaper index update when walking by cache-tree

2018-08-10 Thread Duy Nguyen
On Fri, Aug 10, 2018 at 9:40 PM Elijah Newren wrote: > > On Fri, Aug 10, 2018 at 12:30 PM Duy Nguyen wrote: > > On Fri, Aug 10, 2018 at 8:39 PM Elijah Newren wrote: > ... > > > Why do we still need to go through add_index_entry()? I thought that > > > the whole point was that you already

Re: [PATCH v2 4/4] unpack-trees: cheaper index update when walking by cache-tree

2018-08-10 Thread Elijah Newren
On Fri, Aug 10, 2018 at 12:30 PM Duy Nguyen wrote: > On Fri, Aug 10, 2018 at 8:39 PM Elijah Newren wrote: ... > > Why do we still need to go through add_index_entry()? I thought that > > the whole point was that you already checked that at the current path, > > the trees being unpacked were all

Re: [PATCH v2 4/4] unpack-trees: cheaper index update when walking by cache-tree

2018-08-10 Thread Duy Nguyen
On Fri, Aug 10, 2018 at 8:39 PM Elijah Newren wrote: > > On Fri, Aug 10, 2018 at 9:39 AM Duy Nguyen wrote: > > > > On Wed, Aug 8, 2018 at 8:46 PM Elijah Newren wrote: > > > > @@ -701,6 +702,24 @@ static int traverse_by_cache_tree(int pos, int > > > > nr_entries, int nr_names, > > > > If we're

Re: [PATCH v2 4/4] unpack-trees: cheaper index update when walking by cache-tree

2018-08-10 Thread Elijah Newren
On Fri, Aug 10, 2018 at 9:39 AM Duy Nguyen wrote: > > On Wed, Aug 8, 2018 at 8:46 PM Elijah Newren wrote: > > > @@ -701,6 +702,24 @@ static int traverse_by_cache_tree(int pos, int > > > nr_entries, int nr_names, > > If we're going to go this route, I think we should first check that > > o->fn

Re: [PATCH v2 4/4] unpack-trees: cheaper index update when walking by cache-tree

2018-08-10 Thread Duy Nguyen
On Wed, Aug 8, 2018 at 8:46 PM Elijah Newren wrote: > > @@ -701,6 +702,24 @@ static int traverse_by_cache_tree(int pos, int > > nr_entries, int nr_names, > > if (!o->merge) > > BUG("We need cache-tree to do this optimization"); > > > > + /* > > +* Try to

Re: [PATCH v2 4/4] unpack-trees: cheaper index update when walking by cache-tree

2018-08-08 Thread Elijah Newren
On Sun, Jul 29, 2018 at 3:36 AM Nguyễn Thái Ngọc Duy wrote: > > With the new cache-tree, we could mostly avoid I/O (due to odb access) > the code mostly becomes a loop of "check this, check that, add the > entry to the index". We could skip a couple checks in this giant loop > to go faster: > > -

[PATCH v2 4/4] unpack-trees: cheaper index update when walking by cache-tree

2018-07-29 Thread Nguyễn Thái Ngọc Duy
With the new cache-tree, we could mostly avoid I/O (due to odb access) the code mostly becomes a loop of "check this, check that, add the entry to the index". We could skip a couple checks in this giant loop to go faster: - We know here that we're copying entries from the source index to the