Re: [PATCH v2 0/2] do_compare_entry: use already-computed path

2015-12-22 Thread Junio C Hamano
David Turner  writes:

> On Mon, 2015-12-21 at 15:34 -0800, Junio C Hamano wrote:
>> Great. Thanks, will queue w/o 1/2 (though I do not think it would
>> hurt).
>> 
>> On Mon, Dec 21, 2015 at 3:33 PM, David Turner <
>> dtur...@twopensource.com> wrote:
>> > On Mon, 2015-12-21 at 15:27 -0800, Junio C Hamano wrote:
>> > > Thanks.  Does the number still stay at 25% improvement?
>> > 
>> > Yes.
>
> BTW, that function, via ce_in_traverse_path, gets called about 40
> million times when switching (checking out) between master and a
> branch that's a few months old (and that contains relatively small
> changes from master-as-of-then. Our repo only has approximately a
> quarter -million files.  This seems somewhat unreasonable to me,
> but I haven't really looked into what's going on.  Do you happen
> to know why this is and whether it is likely to be a bug?

That does sound excessive; smells like somebody is being overly
cautious (i.e. a performance bug).

We might be seeing something similar to what e53e6b44 observed and
attempted to correct.  I dunno.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/2] do_compare_entry: use already-computed path

2015-12-21 Thread Junio C Hamano
Thanks.  Does the number still stay at 25% improvement?

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/2] do_compare_entry: use already-computed path

2015-12-21 Thread David Turner
On Mon, 2015-12-21 at 15:27 -0800, Junio C Hamano wrote:
> Thanks.  Does the number still stay at 25% improvement?

Yes.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 0/2] do_compare_entry: use already-computed path

2015-12-21 Thread David Turner
This version strdups the path to avoid it getting mutated.  Problem
noted by Junio.


David Turner (2):
  traverse_info: make mostly const
  do_compare_entry: use already-computed path

 builtin/merge-tree.c |  2 +-
 cache-tree.c |  4 ++--
 cache-tree.h |  2 +-
 t/t4010-diff-pathspec.sh |  2 +-
 tree-walk.c  |  9 +++-
 tree-walk.h  |  5 +++--
 unpack-trees.c   | 55 
 7 files changed, 62 insertions(+), 17 deletions(-)

-- 
2.4.2.749.g730654d-twtrsrc

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/2] do_compare_entry: use already-computed path

2015-12-21 Thread David Turner
On Mon, 2015-12-21 at 15:34 -0800, Junio C Hamano wrote:
> Great. Thanks, will queue w/o 1/2 (though I do not think it would
> hurt).
> 
> On Mon, Dec 21, 2015 at 3:33 PM, David Turner <
> dtur...@twopensource.com> wrote:
> > On Mon, 2015-12-21 at 15:27 -0800, Junio C Hamano wrote:
> > > Thanks.  Does the number still stay at 25% improvement?
> > 
> > Yes.

BTW, that function, via ce_in_traverse_path, gets called about 40
million times when switching (checking out) between master and a branch
that's a few months old (and that contains relatively small changes
from master-as-of-then. Our repo only has approximately a quarter
-million files.  This seems somewhat unreasonable to me, but I haven't
really looked into what's going on. Do you happen to know why this is
and whether it is likely to be a bug?

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html