From: Kjetil Barvik <barvik@broadpark.no>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>, Kjetil Barvik <barvik@broadpark.no>
Subject: [PATCH/RFC v2 0/7] git checkout: more cleanups, optimisation, less lstat() calls
Date: Sun, 01 Feb 2009 21:23:08 +0100 [thread overview]
Message-ID: <cover.1233499703.git.barvik@broadpark.no> (raw)
Changes since v1
--- patch 1/7 ---
Kept the "match_len >= cache.len" trick only inside the
longest_match_lstat_cache() function. Also removed the arguments to
reset_lstat_cache()
--- patch 2/7 ---
Applied all comments from Junio
--- patch 3/7 ---
Kept long format strings in printf() calls, even if source lines get
longer than 80 chars. The patch touch less source lines because of
this.
--- patch 4/7 ---
Added sanity check to the if-test under which fstat() is called.
--- patch 5/7 ---
Updated commit log message
--- patch 7/7 ---
New patch which reduces the number of rmdir() calls significantly.
When tested with 'git chekcout -q my-v2.6.27' (checkout from Linux
v2.6.25 to v2.6.27), the numbers look like this before this patch:
rmdir 4532 3.314% OK: 174 NOT: 4358 0.263268 sec 58 usec/call
strings 4532 tot 354 uniq 12.802 /uniq 0.263268 sec 58 usec/call
errors 4358 tot 347 uniq 12.559 /uniq 0.249116 sec 57 usec/call
233 5.141% OK: 1 NOT: 232 "include/asm-powerpc"
187 4.126% OK: 1 NOT: 186 "include/asm-sh"
172 3.795% OK: 0 NOT: 172 "include/asm-arm"
169 3.729% OK: 1 NOT: 168 "include/asm-sparc64"
161 3.553% OK: 1 NOT: 160 "include/asm-sparc"
144 3.177% OK: 1 NOT: 143 "include/asm-ia64"
143 3.155% OK: 1 NOT: 142 "include/asm-m68knommu"
133 2.935% OK: 1 NOT: 132 "include/asm-alpha"
126 2.780% OK: 1 NOT: 125 "include/asm-s390"
122 2.692% OK: 1 NOT: 121 "include/asm-v850"
Notice the nice change in the top 10 list after this patch:
rmdir 331 0.255% OK: 174 NOT: 157 0.033435 sec 101 usec/call
strings 331 tot 331 uniq 1.000 /uniq 0.033435 sec 101 usec/call
errors 157 tot 157 uniq 1.000 /uniq 0.016300 sec 104 usec/call
1 0.302% OK: 0 NOT: 1 "Documentation"
1 0.302% OK: 0 NOT: 1 "Documentation/filesystems/configfs"
1 0.302% OK: 0 NOT: 1 "Documentation/firmware_class"
1 0.302% OK: 1 NOT: 0 "Documentation/hrtimer"
1 0.302% OK: 1 NOT: 0 "Documentation/hrtimers"
1 0.302% OK: 0 NOT: 1 "Documentation/i2c/busses"
1 0.302% OK: 1 NOT: 0 "Documentation/i386"
1 0.302% OK: 0 NOT: 1 "Documentation/networking"
1 0.302% OK: 0 NOT: 1 "Documentation/power"
1 0.302% OK: 0 NOT: 1 "Documentation/powerpc"
Kjetil Barvik (7):
symlinks.c: small cleanup and optimisation
remove some memcpy() and strchr() calls inside create_directories()
cleanup of write_entry() in entry.c
write_entry(): use fstat() instead of lstat() when file is open
combine-diff.c: remove a call to fstat() inside show_patch_diff()
lstat_cache(): print a warning if doing ping-pong between cache types
unpack-trees.c: introduce schedule_dir_for_removal()
combine-diff.c | 4 +--
entry.c | 106 +++++++++++++++++++++++++++-----------------------------
symlinks.c | 67 +++++++++++++++++++++++++----------
unpack-trees.c | 97 ++++++++++++++++++++++++++++++++++++++-------------
4 files changed, 172 insertions(+), 102 deletions(-)
next reply other threads:[~2009-02-01 20:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-01 20:23 Kjetil Barvik [this message]
2009-02-01 20:23 ` [PATCH/RFC v2 1/7] symlinks.c: small cleanup and optimisation Kjetil Barvik
2009-02-01 20:23 ` [PATCH/RFC v2 2/7] remove some memcpy() and strchr() calls inside create_directories() Kjetil Barvik
2009-02-01 20:23 ` [PATCH/RFC v2 3/7] cleanup of write_entry() in entry.c Kjetil Barvik
2009-02-01 20:23 ` [PATCH/RFC v2 4/7] write_entry(): use fstat() instead of lstat() when file is open Kjetil Barvik
2009-02-01 20:23 ` [PATCH/RFC v2 5/7] combine-diff.c: remove a call to fstat() inside show_patch_diff() Kjetil Barvik
2009-02-01 20:23 ` [PATCH/RFC v2 6/7] lstat_cache(): print a warning if doing ping-pong between cache types Kjetil Barvik
2009-02-01 20:23 ` [PATCH/RFC v2 7/7] unpack-trees.c: introduce schedule_dir_for_removal() Kjetil Barvik
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=cover.1233499703.git.barvik@broadpark.no \
--to=barvik@broadpark.no \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).