On Thu, 9 Sep 2010, martin f krafft wrote: > I agree with you, but there's a fundamental difference: gitk (seems to) > generate this information up front for all commits, while gitweb only > needs to generate it for a single commit at a time. So the question is > really: are the required calls to git-describe and/or git-name-rev that > expensive?
Unfortunately, they can be. For example, on my (admittedly rather huge) linux-2.6 repository with a cold cache, then again with a warm cache: $ time git name-rev 0af184bb9f80edfbb94de46cb52e9592e5a547b0 0af184bb9f80edfbb94de46cb52e9592e5a547b0 tags/v2.6.17.4~1 real 1m12.334s user 0m16.510s sys 0m1.440s $ time git name-rev 0af184bb9f80edfbb94de46cb52e9592e5a547b0 0af184bb9f80edfbb94de46cb52e9592e5a547b0 tags/v2.6.17.4~1 real 0m13.305s user 0m12.720s sys 0m0.580s Basically, this is slow because it needs to walk up through the entire repository from every ref through parent pointers looking for the given commit. Reading the entire graph structure into a cache (like gitk) can make this more efficient on average if you do a lot of queries in a row, but otherwise there isn’t much you can do given the current Git repository format. Anders -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

