# gitk graph routing problem

8 messages from 2007-11-04 to 2007-12-14. Participants: Alex Riesen, Paul Mackerras, Junio C Hamano.
Thread: https://gitlist.dev/t/10638

## Alex Riesen, 2007-11-04 10:46

Subject: gitk graph routing problem
Message-ID: <20071104104618.GA3078@steel.home>
URL: https://gitlist.dev/e/20071104104618.GA3078%40steel.home

```
To reproduce, try running in git repo:

    gitk 02f630448e5d48e..06ea6ba9cf46ef5

Than go some pages (around 5) forward. You should notice system load
going up rapidly. Now try paging back - and graph starts stretching
to the right, to the point nothing fits on the screen anymore.

Gitk as of commit 7388bcbc5431552718dde5c3259d861d2fa75a12 in git
repository. Git - v1.5.3.5-551-g02f6304 (terse fetch output and some
*really* unrelated local modifications. Anyway, the gitk is the same).
Bisect points to or around 6e8c87070306a757c4d7fd2c55cca3a90fe140c7
"gitk: Establish and use global left-to-right ordering for commits".
It loops heavily at this commit and looks broken in all subsequent
commits.

Last know good was 3244729aac7515c. The master of gitk repo is ok too.

```

## Paul Mackerras, 2007-11-04 21:47

Subject: Re: gitk graph routing problem
Message-ID: <18222.15870.945694.238217@cargo.ozlabs.ibm.com>
URL: https://gitlist.dev/e/18222.15870.945694.238217%40cargo.ozlabs.ibm.com
In-Reply-To: <20071104104618.GA3078@steel.home>

```
Alex Riesen writes:

> To reproduce, try running in git repo:
> 
>     gitk 02f630448e5d48e..06ea6ba9cf46ef5

I can't reproduce it here, as my clone of the git repo doesn't have
02f630448e5d48e in it, even after updating...

Paul.

```

## Junio C Hamano, 2007-11-04 23:14

Subject: Re: gitk graph routing problem
Message-ID: <7vzlxtr4bu.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vzlxtr4bu.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <18222.15870.945694.238217@cargo.ozlabs.ibm.com>

```
Paul Mackerras <paulus@samba.org> writes:

> Alex Riesen writes:
>
>> To reproduce, try running in git repo:
>> 
>>     gitk 02f630448e5d48e..06ea6ba9cf46ef5
>
> I can't reproduce it here, as my clone of the git repo doesn't have
> 02f630448e5d48e in it, even after updating...

Heh, me neither ;-).

```

## Alex Riesen, 2007-11-05 00:53

Subject: Re: gitk graph routing problem
Message-ID: <20071105005349.GA5355@steel.home>
URL: https://gitlist.dev/e/20071105005349.GA5355%40steel.home
In-Reply-To: <7vzlxtr4bu.fsf@gitster.siamese.dyndns.org>

```
Junio C Hamano, Mon, Nov 05, 2007 00:14:29 +0100:
> Paul Mackerras <paulus@samba.org> writes:
> 
> > Alex Riesen writes:
> >
> >> To reproduce, try running in git repo:
> >> 
> >>     gitk 02f630448e5d48e..06ea6ba9cf46ef5
> >
> > I can't reproduce it here, as my clone of the git repo doesn't have
> > 02f630448e5d48e in it, even after updating...
> 
> Heh, me neither ;-).

Stupid me. Will follow up with a link to the archived repo in private mail.

```

## Alex Riesen, 2007-11-05 01:17

Subject: Re: gitk graph routing problem
Message-ID: <20071105011700.GB5355@steel.home>
URL: https://gitlist.dev/e/20071105011700.GB5355%40steel.home
In-Reply-To: <20071105005349.GA5355@steel.home>

```
Alex Riesen, Mon, Nov 05, 2007 01:53:49 +0100:
> Junio C Hamano, Mon, Nov 05, 2007 00:14:29 +0100:
> > Paul Mackerras <paulus@samba.org> writes:
> > 
> > > Alex Riesen writes:
> > >
> > >> To reproduce, try running in git repo:
> > >> 
> > >>     gitk 02f630448e5d48e..06ea6ba9cf46ef5
> > >
> > > I can't reproduce it here, as my clone of the git repo doesn't have
> > > 02f630448e5d48e in it, even after updating...
> > 
> > Heh, me neither ;-).
> 
> Stupid me. Will follow up with a link to the archived repo in private mail.
> 

http://ftp-tmp:ftp-tmp@h877881.stratoserver.net/~ftp-tmp/break-gitk.git.tar.bz2

Its around 60mb.

```

## Alex Riesen, 2007-11-05 01:19

Subject: Re: gitk graph routing problem
Message-ID: <20071105011907.GC5355@steel.home>
URL: https://gitlist.dev/e/20071105011907.GC5355%40steel.home
In-Reply-To: <20071105011700.GB5355@steel.home>

```
Alex Riesen, Mon, Nov 05, 2007 02:17:00 +0100:
> Alex Riesen, Mon, Nov 05, 2007 01:53:49 +0100:
> > Junio C Hamano, Mon, Nov 05, 2007 00:14:29 +0100:
> > > Paul Mackerras <paulus@samba.org> writes:
> > > 
> > > > Alex Riesen writes:
> > > >
> > > >> To reproduce, try running in git repo:
> > > >> 
> > > >>     gitk 02f630448e5d48e..06ea6ba9cf46ef5
> > > >
> > > > I can't reproduce it here, as my clone of the git repo doesn't have
> > > > 02f630448e5d48e in it, even after updating...
> > > 
> > > Heh, me neither ;-).
> > 
> > Stupid me. Will follow up with a link to the archived repo in private mail.
> > 

and of course, I send it to everyone... Ach, well. Will keep it for a
week, or until it is reproduced somewhere else. Whichever comes first.

```

## Paul Mackerras, 2007-12-11 22:26

Subject: Re: gitk graph routing problem
Message-ID: <18271.3714.731136.272491@cargo.ozlabs.ibm.com>
URL: https://gitlist.dev/e/18271.3714.731136.272491%40cargo.ozlabs.ibm.com
In-Reply-To: <20071104104618.GA3078@steel.home>

```
Alex Riesen writes:

> To reproduce, try running in git repo:
> 
>     gitk 02f630448e5d48e..06ea6ba9cf46ef5
> 
> Than go some pages (around 5) forward. You should notice system load
> going up rapidly. Now try paging back - and graph starts stretching
> to the right, to the point nothing fits on the screen anymore.

I finally got back to look at this.  The problem is not so much the
layout algorithm per se as the fact that I haven't worked out a good
way to pack lots of downward-pointing arrows in without using up
arbitrarily large amounts of horizontal space.  You have managed to
find an example where just about every commit is a merge needing one
or more downward-pointing arrows.

Incidentally, gitk from the dev branch of my gitk.git repo does much
better on this example, since it is able to hoist the open-circle
(excluded) commits up to the row below their merge children, which
looks much nicer.

Paul.

```

## Alex Riesen, 2007-12-14 22:29

Subject: Re: gitk graph routing problem
Message-ID: <20071214222931.GB4943@steel.home>
URL: https://gitlist.dev/e/20071214222931.GB4943%40steel.home
In-Reply-To: <18271.3714.731136.272491@cargo.ozlabs.ibm.com>

```
Paul Mackerras, Tue, Dec 11, 2007 23:26:10 +0100:
> Alex Riesen writes:
> 
> > To reproduce, try running in git repo:
> > 
> >     gitk 02f630448e5d48e..06ea6ba9cf46ef5
> > 
> > Than go some pages (around 5) forward. You should notice system load
> > going up rapidly. Now try paging back - and graph starts stretching
> > to the right, to the point nothing fits on the screen anymore.
> 
> I finally got back to look at this.  The problem is not so much the
> layout algorithm per se as the fact that I haven't worked out a good
> way to pack lots of downward-pointing arrows in without using up
> arbitrarily large amounts of horizontal space.  You have managed to
> find an example where just about every commit is a merge needing one
> or more downward-pointing arrows.
> 
> Incidentally, gitk from the dev branch of my gitk.git repo does much
> better on this example, since it is able to hoist the open-circle
> (excluded) commits up to the row below their merge children, which
> looks much nicer.

could you point to a specific commit where it does that?

Because the current head of dev branch at //git.kernel.org/pub/scm/gitk/gitk
(3de07118f0993e6f7bc7ce02276751795d80b877) does not look any
different and still almost locks up drawing all the horizontal lines.

```
