From: "Shawn O. Pearce" <spearce@spearce.org>
To: Marco Costalba <mcostalba@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH WIP] sha1-lookup: make selection of 'middle' less aggressive
Date: Mon, 31 Dec 2007 17:40:15 -0500 [thread overview]
Message-ID: <20071231224015.GW14735@spearce.org> (raw)
In-Reply-To: <e5bfff550712301106l133dd38btd2cc4be02159387d@mail.gmail.com>
Marco Costalba <mcostalba@gmail.com> wrote:
> Just for document the profiling I have uploaded a snapshot of
> KCachegrind profiling data on a run of git-log on the git tree:
>
> http://digilander.libero.it/mcostalba/callgrind_git_log1.png
>
> From there you can see that pretty.c and strbuf.c, after all the
> optimizations, account for less then 8% of total time.
> The biggest part is that 86.64% that is due almost entirely to zlib.
>
> In particular
>
> st = inflate(&stream, Z_FINISH);
>
> called from unpack_compressed_entry() in sha1_file.c accounts for 72%
> of total time.
That's one of the areas where packv4 was actually a reasonably
good gain. It was faster for packv4 to convert a dict based commit
or tree into the canonical raw format used by git than it was for
zlib inflate to decompress the very same data.
It wasn't a huge gain, but if I recall we were saving a good half
second on a 4 second "git log --raw >/dev/null" time. And that
was before we even tried to improve the tree walking APIs to
take advantage of the smaller (and easier to read) dict based
tree objects.
Linus already mentioned in another reply on this thread that the
inflate time may be all page faults. The savings we were seeing
from the dict based format may have simply been due to less page
faults; the dict based format was slightly smaller so we probably
got a lot more in disk cache at once.
--
Shawn.
next prev parent reply other threads:[~2007-12-31 22:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-30 10:22 [PATCH WIP] sha1-lookup: more memory efficient search in sorted list of SHA-1 Junio C Hamano
2007-12-30 11:38 ` [PATCH WIP] sha1-lookup: make selection of 'middle' less aggressive Junio C Hamano
2007-12-30 19:06 ` Marco Costalba
2007-12-30 19:12 ` Marco Costalba
2007-12-31 22:40 ` Shawn O. Pearce [this message]
2007-12-30 19:58 ` Linus Torvalds
2007-12-30 21:49 ` Junio C Hamano
2007-12-30 22:04 ` Marco Costalba
2007-12-31 20:37 ` Linus Torvalds
2007-12-31 23:47 ` Marco Costalba
2008-01-01 6:36 ` Jeff King
2008-01-01 8:40 ` Marco Costalba
2008-01-01 9:01 ` Marco Costalba
2008-01-01 14:51 ` Pierre Habouzit
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=20071231224015.GW14735@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mcostalba@gmail.com \
/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).