From: Linus Torvalds <torvalds@linux-foundation.org>
To: Kjetil Barvik <barvik@broadpark.no>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] check_updates(): effective removal of cache entries marked CE_REMOVE
Date: Wed, 18 Feb 2009 14:44:34 -0800 (PST) [thread overview]
Message-ID: <alpine.LFD.2.00.0902181436390.21686@localhost.localdomain> (raw)
In-Reply-To: <1234995483-933-1-git-send-email-barvik@broadpark.no>
On Wed, 18 Feb 2009, Kjetil Barvik wrote:
>
> To fix this, and use an O(N) algorithm instead, where N is the number
> of cache_entries, we delete/remove all entries in one loop through all
> entries.
Ack. We've had things like this before. I'm somewhat surprised that it is
noticeable even in the "o->update" case (since I would have expected the
cost of actually doing an unlink() to swamp the memmove overhead), but the
patch looks obviously correct.
Looking at the numbers, I guess it's not _really_ noticeable - it's 1.8%
of git user-space time, which in turn is about 75% of total time, so it's
not a huge improvement, but I'll certainly ack it anyway as being the
right thing to do. Every little bit helps.
Linus
next prev parent reply other threads:[~2009-02-18 22:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-18 22:18 [PATCH] check_updates(): effective removal of cache entries marked CE_REMOVE Kjetil Barvik
2009-02-18 22:44 ` Linus Torvalds [this message]
2009-02-19 8:24 ` Alex Riesen
2009-02-19 9:06 ` Kjetil Barvik
2009-02-20 7:41 ` Junio C Hamano
2009-02-20 9:01 ` Kjetil Barvik
2009-02-20 9:14 ` Johannes Schindelin
2009-02-20 10:15 ` 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=alpine.LFD.2.00.0902181436390.21686@localhost.localdomain \
--to=torvalds@linux-foundation.org \
--cc=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