From: Joshua Redstone <joshua.redstone@fb.com>
To: Thomas Rast <trast@student.ethz.ch>
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Nguyen Thai Ngoc Duy" <pclouds@gmail.com>,
"Carlos Martín Nieto" <cmn@elego.de>,
"Tomas Carnecky" <tom@dbservice.com>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Debugging git-commit slowness on a large repo
Date: Tue, 20 Dec 2011 19:26:50 +0000 [thread overview]
Message-ID: <CB162065.2E009%joshua.redstone@fb.com> (raw)
In-Reply-To: <87wr9rk35n.fsf@thomas.inf.ethz.ch>
I looked again at my poor-mans-profiling output of git-add. The Sha1
stuff under ce_write_entry->ce_write_flush takes a bunch of time.
commit_lock_file->rename takes about the same as well.
Btw, the perf numbers for commit and add are with a warm file cache. I
expect the benefit of skipping all the stat() calls will increase for cold
cache.
Josh
On 12/20/11 1:23 AM, "Thomas Rast" <trast@student.ethz.ch> wrote:
>Joshua Redstone <joshua.redstone@fb.com> writes:
>> As a bonus, I've also profiled git-add on the 1-million file repo, and
>>it
>> looks like, as you might expect, the time is dominated by reading and
>> writing the index. The time for git-add is a couple of seconds.
>
>Note that the time to write the index itself is also rather small, but
>the time needed to sha1 the index when loading and then again when
>saving it really hurts.
>
>(I noticed this while working on the commit-tree topic.)
>
>--
>Thomas Rast
>trast@{inf,student}.ethz.ch
next prev parent reply other threads:[~2011-12-20 19:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-02 23:17 Debugging git-commit slowness on a large repo Joshua Redstone
2011-12-03 0:23 ` Carlos Martín Nieto
2011-12-05 17:38 ` Junio C Hamano
2011-12-07 1:48 ` Joshua Redstone
2011-12-07 2:08 ` Nguyen Thai Ngoc Duy
2011-12-07 22:48 ` Joshua Redstone
2011-12-08 1:39 ` Nguyen Thai Ngoc Duy
2011-12-09 0:09 ` Joshua Redstone
2011-12-09 0:17 ` Joshua Redstone
2011-12-13 0:15 ` Joshua Redstone
2011-12-20 0:51 ` Joshua Redstone
2011-12-20 1:21 ` Junio C Hamano
2011-12-20 1:40 ` Joshua Redstone
2011-12-20 9:23 ` Thomas Rast
2011-12-20 19:26 ` Joshua Redstone [this message]
2011-12-04 13:54 ` Tomas Carnecky
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=CB162065.2E009%joshua.redstone@fb.com \
--to=joshua.redstone@fb.com \
--cc=cmn@elego.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.com \
--cc=tom@dbservice.com \
--cc=trast@student.ethz.ch \
/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).