Re: New features in gitk
- From
Paul Mackerras <paulus@samba.org>
- Date
- Nov 1, 2007, 11:37 UTC
- Message-ID
- <18217.47744.621850.100789@cargo.ozlabs.ibm.com>
- In-Reply-To
- <alpine.LFD.0.999.0710280943090.30120@woody.linux-foundation.org>
Linus Torvalds writes:
> The cost is not generally in outputting the commits. The real cost is in > traversing them in the first place.
Actually, the biggest cost is still gitk reading in the commits from git log and doing the processing that gitk needs to do on each commit (which I have tried to minimize, and is way smaller than it used to be, but is still significant).
In fact that would go significantly faster if git log could output the data for each commit in a slightly different format. What would be good is to get one header line for each commit in the form:
id flag {parent parent parent...} lengthwhere:
id is the 40-char SHA1 for the commit
flag is normally 1, but is 0 for "boundary" commits, 2 for "left-side"
commits (with --merge), or 3 for "right-side" commits
length is the number of characters of commit data that follow
(which may differ from the number of bytes, so there would need
to be agreement on the encoding)followed by the body of the commit (with no null or other separator character between commits).
That would be easier to parse in Tcl, and looks like it would knock another 1.5 seconds off the gitk startup time (for the kernel repository on my G5).
Paul.