From: Thomas Rast <trast@inf.ethz.ch>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: <git@vger.kernel.org>, Joshua Redstone <joshua.redstone@fb.com>
Subject: Re: [PATCH 0/3] On compresing large index
Date: Sun, 5 Feb 2012 22:22:49 +0100 [thread overview]
Message-ID: <87ehu9ug9i.fsf@thomas.inf.ethz.ch> (raw)
In-Reply-To: <1328430605-4566-1-git-send-email-pclouds@gmail.com> ("Nguyễn Thái Ngọc Duy"'s message of "Sun, 5 Feb 2012 15:30:02 +0700")
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
> $ time ~/w/git/git ls-files | head >/dev/null
> real 0m4.635s
> user 0m4.258s
> sys 0m0.329s
>
> $ time ~/w/git/git update-index level-0-0000/foo
> real 0m4.593s
> user 0m4.264s
> sys 0m0.323s
[...]
> We need to figure out what git uses 4s user time for.
When I worked on the cache-tree stuff, my observation (based on
profiling, so I had actual data :-) was that computing SHA1s absolutely
dominates everything in such operations. It does that when writing the
index to write the trailing checksum, and also when loading it to verify
that the index is valid.
ls-files shouldn't be so slow though. A quick run with callgrind in a
linux-2.6.git tells me it spends about 45% of its time on SHA1s and a
whopping 25% in quote_c_style(). I wonder what's so hard about
quoting...
> This series may be useful on OSes that do not cache heavily. Though
> I'm not sure if there is any out there nowadays.
I think you could make a case that they should not be called "OS" ;-)
--
Thomas Rast
trast@{inf,student}.ethz.ch
next prev parent reply other threads:[~2012-02-05 21:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-05 8:30 [PATCH 0/3] On compresing large index Nguyễn Thái Ngọc Duy
2012-02-05 8:30 ` [PATCH 1/3] read-cache: factor out cache entries reading code Nguyễn Thái Ngọc Duy
2012-02-05 8:30 ` [PATCH 2/3] read-cache: reduce malloc/free during writing index Nguyễn Thái Ngọc Duy
2012-02-05 8:30 ` [PATCH 3/3] Support compressing index when GIT_ZCACHE=1 Nguyễn Thái Ngọc Duy
2012-02-05 21:22 ` Thomas Rast [this message]
2012-02-06 1:35 ` [PATCH 0/3] On compresing large index Nguyen Thai Ngoc Duy
2012-02-06 15:54 ` Joshua Redstone
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=87ehu9ug9i.fsf@thomas.inf.ethz.ch \
--to=trast@inf.ethz.ch \
--cc=git@vger.kernel.org \
--cc=joshua.redstone@fb.com \
--cc=pclouds@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).