git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Cc: "Git Mailing List" <git@vger.kernel.org>,
	"Jeff King" <peff@peff.net>,
	"Stefan Beller" <stefanbeller@gmail.com>,
	"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
	"Jeff King" <peff@peff.net>
Subject: Re: approximate_object_count_valid never set?
Date: Thu, 17 Sep 2020 13:58:14 +0200	[thread overview]
Message-ID: <87pn6khay1.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <4a018cb9-da40-a98f-a1b9-73be30ae79ec@rasmusvillemoes.dk>


On Thu, Sep 17 2020, Rasmus Villemoes wrote:

> Hi,
>
> While poking around the code, I noticed that it seems
> ->approximate_object_count_valid is never set to 1, and it never has
> been, not even back when it was a global variable. So perhaps it can
> just be removed and the logic depending on it simplified? Or am I
> missing some preprocessor trickery.
>
> Nobody seems to have noticed the lack of caching - and actually setting
> it to 1 after the count has been computed might be a little dangerous
> unless one takes care to invalidate the cache anywhere that might be
> relevant.

There's some previous discussion about this in
https://public-inbox.org/git/20180226085508.GA30343@sigill.intra.peff.net/

  reply	other threads:[~2020-09-17 11:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-17  8:20 approximate_object_count_valid never set? Rasmus Villemoes
2020-09-17 11:58 ` Ævar Arnfjörð Bjarmason [this message]
2020-09-17 12:53 ` Jeff King
2020-09-17 16:47   ` [PATCH] packfile: actually set approximate_object_count_valid Jeff King
2020-09-17 16:53     ` Taylor Blau
2020-09-17 18:26     ` 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

  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=87pn6khay1.fsf@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.com \
    --cc=peff@peff.net \
    --cc=rv@rasmusvillemoes.dk \
    --cc=stefanbeller@gmail.com \
    /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).