From: Jeff King <peff@peff.net>
To: Peter Krefting <peter@softwolves.pp.se>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: cherry-pick very slow on big repository
Date: Fri, 10 Nov 2017 10:20:12 +0000 [thread overview]
Message-ID: <20171110102011.yqtka6a3wmgcvkl6@sigill.intra.peff.net> (raw)
In-Reply-To: <alpine.DEB.2.00.1711100959300.2391@ds9.cixit.se>
On Fri, Nov 10, 2017 at 10:39:39AM +0100, Peter Krefting wrote:
> Running strace, it seems like it is doing lstat(), open(), mmap(), close()
> and munmap() on every single file in the repository, which takes a lot of
> time.
>
> I thought it was just updating the status, but "git status" returns
> immediately, while cherry-picking takes several minutes for every
> cherry-pick I do.
It kind of sounds like a temporary index is being refreshed that doesn't
have the proper stat information.
Can you get a backtrace? I'd do something like:
- gdb --args git cherry-pick ...
- 'r' to run
- give it a few seconds to hit the CPU heavy part, then ^C
- 'bt' to generate the backtrace
which should give a sense of which code path is leading to the slowdown
(or of course use real profiling tools, but if the slow path is taking 6
minutes, you'll be likely to stop in the middle of it ;) ).
-Peff
next prev parent reply other threads:[~2017-11-10 10:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-10 9:39 cherry-pick very slow on big repository Peter Krefting
2017-11-10 10:20 ` Jeff King [this message]
2017-11-10 12:37 ` Peter Krefting
2017-11-10 12:59 ` Derrick Stolee
2017-11-10 14:05 ` Peter Krefting
2017-11-10 17:04 ` Kevin Willford
2017-11-13 11:19 ` Peter Krefting
2017-11-10 17:37 ` Elijah Newren
2017-11-10 23:32 ` Elijah Newren
2017-11-13 11:22 ` Peter Krefting
2017-11-13 18:09 ` Elijah Newren
2017-11-21 12:07 ` Peter Krefting
2017-11-21 17:14 ` Elijah Newren
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171110102011.yqtka6a3wmgcvkl6@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=peter@softwolves.pp.se \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).