git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Kousik Sanagavarapu <five231003@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] ref-filter: sort numerically when ":size" is used
Date: Fri, 01 Sep 2023 13:21:10 -0700	[thread overview]
Message-ID: <xmqq7cp9prux.fsf@gitster.g> (raw)
In-Reply-To: <20230901191639.GA1955435@coredump.intra.peff.net> (Jeff King's message of "Fri, 1 Sep 2023 15:16:39 -0400")

Jeff King <peff@peff.net> writes:

> But I think that is the wrong way to optimize it. We shouldn't be
> storing any strings per-atom, but rather walking the parse tree to
> produce a single output buffer. And the values should be cheap to fill
> in, because we should parse the object as necessary up front. This is
> more or less the way the pretty.c parser does it.

I thought "as necessary" may be a bit tricky as populate_value()
were taught to omit doing the whole get_object() thing when the
values for used_atom[] are all computable without parsing the object
at all, but it seems that over time the populate_value() callchain
has degraded sufficiently to unconditionally call get_object() these
days, so I agree that the arrangement does not have much optimization
value, at least in the current code.


  reply	other threads:[~2023-09-01 20:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-01 14:24 [PATCH] ref-filter: sort numerically when ":size" is used Kousik Sanagavarapu
2023-09-01 16:43 ` Junio C Hamano
2023-09-01 17:45   ` Jeff King
2023-09-01 17:59     ` Junio C Hamano
2023-09-01 18:32       ` Jeff King
2023-09-01 18:59         ` Kousik Sanagavarapu
2023-09-01 19:16           ` Jeff King
2023-09-01 20:21             ` Junio C Hamano [this message]
2023-09-01 20:51               ` Jeff King
2023-09-01 20:04           ` Junio C Hamano
2023-09-01 20:40             ` Jeff King
2023-09-02  9:00 ` [PATCH v2] " Kousik Sanagavarapu
2023-09-02  9:11   ` Kousik Sanagavarapu
2023-09-02 22:19   ` Junio C Hamano

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=xmqq7cp9prux.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=five231003@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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).