From: Philipp Zabel <p.zabel@pengutronix.de>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"SZEDER Gábor" <szeder.dev@gmail.com>
Cc: git@vger.kernel.org, entwicklung@pengutronix.de
Subject: Re: git slow unless piped to cat
Date: Tue, 27 Aug 2019 11:12:06 +0200 [thread overview]
Message-ID: <1566897126.4102.5.camel@pengutronix.de> (raw)
In-Reply-To: <20190827085637.g6cpnuofpteyfqfz@pengutronix.de>
On Tue, 2019-08-27 at 10:56 +0200, Uwe Kleine-König wrote:
> On Tue, Aug 27, 2019 at 10:41:11AM +0200, SZEDER Gábor wrote:
> > On Tue, Aug 27, 2019 at 10:15:59AM +0200, Uwe Kleine-König wrote:
> > > I have a problem here with git being slow in some situations.
> > > Using git 2.23.0 (from Debian) the effect is:
> > >
> > > ukl@dude.ptx:/ptx/src/git/linux.git$ sudo sh -c "echo 3 > /proc/sys/vm/drop_caches"; time git show v5.2
> > > tag v5.2
> > > ...
> > >
> > > real 0m12.727s
> > > user 0m0.300s
> > > sys 0m0.371s
> > >
> > > But to get the actual data isn't the problem:
> > >
> > > ukl@dude.ptx:/ptx/src/git/linux.git$ sudo sh -c "echo 3 > /proc/sys/vm/drop_caches"; time git show v5.2 | cat
> > > tag v5.2
> > > ...
> > >
> > > real 0m0.764s
> > > user 0m0.014s
> > > sys 0m0.020s
> > >
> >
> > How does 'git --no-pager show v5.2' perform? If it's as fast as the
> > case piping the output to cat, then look into what pager and pager
> > options you use.
>
> ukl@dude.ptx:/ptx/src/git/linux.git$ sudo sh -c "echo 3 > /proc/sys/vm/drop_caches"; time git --no-pager show v5.2
> tag v5.2
> ...
>
> real 0m13.225s
> user 0m0.355s
> sys 0m0.336s
>
> So this doesn't seem to be the problem. Also the local configuration
> can be ruled out:
>
> ukl@dude.ptx:/ptx/src/git/linux.git$ sudo sh -c "echo 3 > /proc/sys/vm/drop_caches"; time env GIT_CONFIG_NOSYSTEM=1 HOME=/nonexistant XDG_CONFIG_HOME=/nonexistant git --no-pager show --no-color v5.2
> tag v5.2
> ...
>
> real 0m13.587s
> user 0m0.335s
> sys 0m0.336s
>
> Thanks
> Uwe
Have you checked strace output? I see a directory walk through .git/refs
and .git/packed-refs if the output is not redirected.
regards
Philipp
next prev parent reply other threads:[~2019-08-27 9:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-27 8:15 git slow unless piped to cat Uwe Kleine-König
2019-08-27 8:41 ` SZEDER Gábor
2019-08-27 8:56 ` Uwe Kleine-König
2019-08-27 9:12 ` Philipp Zabel [this message]
2019-08-27 9:44 ` SZEDER Gábor
2019-08-27 10:04 ` Uwe Kleine-König
2019-08-27 10:33 ` SZEDER Gábor
2019-08-27 10:56 ` Uwe Kleine-König
2019-08-27 11:28 ` Michal Suchánek
2019-08-27 18:59 ` Jeff King
2019-08-27 21:32 ` Uwe Kleine-König
2019-08-27 21:38 ` Bryan Turner
2019-08-28 10:24 ` Uwe Kleine-König
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=1566897126.4102.5.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=entwicklung@pengutronix.de \
--cc=git@vger.kernel.org \
--cc=szeder.dev@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
/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).