From: Jeff King <peff@peff.net>
To: Henry Qin <root@hq6.me>
Cc: git@vger.kernel.org
Subject: Re: Why is git log on large repos slower when outputting to tty?
Date: Fri, 18 Oct 2024 00:22:46 -0400 [thread overview]
Message-ID: <20241018042246.GA2408674@coredump.intra.peff.net> (raw)
In-Reply-To: <CAO8bsPASzxoEwiYd7ABf4YZuyTexFnf2B2DXap6xsA6d98DAAw@mail.gmail.com>
On Thu, Oct 17, 2024 at 10:46:17AM -0700, Henry Qin wrote:
> Details in my Stackoverflow question:
>
> https://stackoverflow.com/questions/79099095/why-is-git-log-significantly-slower-when-outputting-to-a-tty
My first thought was "decorations", and indeed somebody gave that answer
in the stack overflow thread. The default for log.decorate is "auto",
which will turn them on when output is to a tty. You can set it to
"false" to disable it.
As for why decorations are slow: it is necessarily going to be at least
linear in the number of refs, since we have to build the reverse mapping
up front. Do you have a lot of refs? What does "git for-each-ref | wc
-l" say?
-Peff
next prev parent reply other threads:[~2024-10-18 4:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-17 17:46 Why is git log on large repos slower when outputting to tty? Henry Qin
2024-10-18 4:22 ` Jeff King [this message]
2024-10-18 4:28 ` Henry Qin
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=20241018042246.GA2408674@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=root@hq6.me \
/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).