From: Jeff King <peff@peff.net>
To: "erik elfström" <erik.elfstrom@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git clean performance issues
Date: Sat, 4 Apr 2015 15:55:07 -0400 [thread overview]
Message-ID: <20150404195507.GA31763@peff.net> (raw)
In-Reply-To: <CAMpP7NY++BwV+UygRj1C6Zsf=jE-z1AQuN3On0HeEqQpKGQtqw@mail.gmail.com>
On Sat, Apr 04, 2015 at 08:32:45PM +0200, erik elfström wrote:
> In my scenario get_ref_cache will be called 10000+ times, each time
> with a new path. The final few calls will need to search through and
> compare 10000+ entries before realizing that there is no existing
> entry. This quickly ads up to 100 million+ calls to strcmp().
>
> From what I can understand, the calls to get_ref_cache in this
> scenario will never do any useful work. Is this correct? If so, would
> it be possible to bypass it, maybe by calling
> resolve_gitlink_ref_recursive directly or by using some other way of
> checking for the presence of a git repo in clean.c:remove_dirs?
I think this is the same issue that was discussed here:
http://thread.gmane.org/gmane.comp.version-control.git/265560/focus=265585
There is some discussion of a possible fix in that thread. I was hoping
that Andreas was going to look further and produce a patch, but I
imagine he got busy with other things. Do you want to try picking it up?
-Peff
next prev parent reply other threads:[~2015-04-04 19:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-04 18:32 git clean performance issues erik elfström
2015-04-04 19:55 ` Jeff King [this message]
2015-04-04 20:39 ` erik elfström
2015-04-04 20:48 ` Jeff King
2015-11-13 14:19 ` Andreas Krey
2015-11-13 23:53 ` Jeff King
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=20150404195507.GA31763@peff.net \
--to=peff@peff.net \
--cc=erik.elfstrom@gmail.com \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.