Re: [PATCH 2/4] revision traversal: retire BOUNDARY_SHOW

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, 6 Mar 2007, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:
> 
> >> > This should help performance, as not all reachable commits are 
> >> > traversed any more.
> >> 
> >> You prevented that with "while (i &&" part already, didn't you?
> >
> > Well, yes. I also wanted to prevent going down all paths, though.
> 
> If we wanted to bundle "-8 A B", I think we would make 'x' and
> 'y' prereqs, as they are the direct parents commits that are
> shown, and that themselves are not shown.
> 
>          .---*---*---*---*---* A
>         /
>     ---x---y---*---*---* B
> 
> If we say upon hitting prereq (x and y) we stop traversal by
> marking the parent UNINTERESTING, I suspected that we may not
> find out 'x' with get_revision() loop, and that was why I chose
> not to.  Instead the loop stops by finding y and then x (and by
> saying "ok I needed to find two and now I have two".

Yes, that is correct. What I wanted to optimize for was this:

x--*--*--A

y--*--B

There is no need to traverse the parents of y to find x. I wanted for the 
traversal to just stop on paths where a prereq was found.

But setting the parents to UNINTERESTING or SHOWN was wrong, because that 
would not stop the traversal: see get_revision_1(). In case revs->limited 
is 0, and the cutoff date is not yet reached, the parents are added 
always. Even if the current commit is UNINTERESTING or SHOWN. (Which is 
correct, of course.)

BTW this behaviour with revs->limited = 1 made me set revs->limited in 
case of revs->reverse in the first place...

Ciao,
Dscho

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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]