Re: approximate_object_count_valid never set?
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Sep 17, 2020, 11:58 UTC
- Message-ID
- <87pn6khay1.fsf@evledraar.gmail.com>
- In-Reply-To
- <4a018cb9-da40-a98f-a1b9-73be30ae79ec@rasmusvillemoes.dk>
On Thu, Sep 17 2020, Rasmus Villemoes wrote:
Show 12 quoted lines
> 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/