From: Jakub Narebski <jnareb@gmail.com>
To: Stephen Bash <bash@genarts.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Trac+Git: rev-list with pathspec performance?
Date: Mon, 04 Oct 2010 18:09:40 -0700 (PDT) [thread overview]
Message-ID: <m3r5g5fnth.fsf@localhost.localdomain> (raw)
In-Reply-To: <27777603.436995.1286223710787.JavaMail.root@mail.hq.genarts.com>
Stephen Bash <bash@genarts.com> writes:
> I'm trying to improve the performance of Trac [1], the GitPlugin for
> Trac[2], and Git. Trac is being extremely sluggish while browsing
> source, and profiling revealed the majority of the time was the
> GitPlugin calling git rev-list. When I directly entered the
> rev-list calls from the shell, I found Git itself was performing
> slower than I would expect...
>
> The bottleneck is while Trac is populating the "last change to file"
> column in the source browser (see the "rev" column of [3] for an
> *cough* SVN *cough* example). This concept of "find the last change
> to a file" was discussed a few weeks ago [4], but unlike that
> thread, the GitPlugin is simply calling git rev-list --max-count=1
> branchName -- fileName for each file in the current directory. For
> files modified recently this is very fast (thousandths of a second),
> but for older files rev-list takes a long time to come up with an
> answer (~2-3 seconds on our server).
[...]
> References:
> [1] http://trac.edgewall.org
> [2] http://trac-hacks.org/wiki/GitPlugin
> [3] http://trac.edgewall.org/browser/trunk
> [4] http://article.gmane.org/gmane.comp.version-control.git/150183/
Note that later[5] in mentioned thread[4] there is proof of concept
"tree blame" (in Perl) which generates such 'last change to file'
information, I think faster than running 'git rev-list -1 <file>' for
each file. Even better would be to encode used algorithm in C.
[5] http://thread.gmane.org/gmane.comp.version-control.git/150063/focus=150183
P.S. Alternate solution would be to simply get rid of SVN-inspired
view. Git tracks history of a *project* as a whole, not set of
histories for individual files (like CVS).
--
Jakub Narebski
Poland
ShadeHawk on #git
next prev parent reply other threads:[~2010-10-05 1:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <13399611.436896.1286218134223.JavaMail.root@mail.hq.genarts.com>
2010-10-04 20:21 ` Trac+Git: rev-list with pathspec performance? Stephen Bash
2010-10-04 20:38 ` Jonathan Nieder
2010-10-05 1:09 ` Jakub Narebski [this message]
2010-10-06 15:26 ` Stephen Bash
2010-10-07 17:49 ` Stephen Bash
2010-10-07 20:33 ` Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3r5g5fnth.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=bash@genarts.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).