From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
git@vger.kernel.org, "René Scharfe" <l.s.r@web.de>
Subject: Re: What's cooking in git.git (Nov 2018, #06; Wed, 21)
Date: Sat, 24 Nov 2018 11:11:36 +0900 [thread overview]
Message-ID: <xmqqefbb442v.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20181122175259.GC22123@sigill.intra.peff.net> (Jeff King's message of "Thu, 22 Nov 2018 12:53:00 -0500")
Jeff King <peff@peff.net> writes:
> Yeah, my intent had been to circle back around to this, but I just
> hadn't gotten to it. I'm still pondering a config option or similar,
> though I remain unconvinced that the cases in which you've showed it
> being slow are actually realistic or worth worrying about (and certainly
> having an obscure config option is not enough to help most people). If
> we could have it kick in heuristically, that would be better.
Me neither and I agree.
> However, note that the cache-load for finding abbreviations _must_ have
> the complete list. And has been loading it for some time. So if you run
> "git-fetch", for example, you've already been running this code for
> months (and using the cache in more places is now a free speedup).
>
> At the very least, we'd want this patch on top, too. I also think René's
> suggestion use access() is worth pursuing (though to some degree is
> orthogonal to the cache).
OK, will queue, but I wonder where 66f0 comes from before silently
doing s/66f04152be/3a2e08245c/ myself.
> -- >8 --
> Subject: [PATCH] odb_load_loose_cache: fix strbuf leak
>
> Commit 66f04152be (object-store: provide helpers for
> loose_objects_cache, 2018-11-12) moved the cache-loading code from
> find_short_object_filename(), but forgot the line that releases the path
> strbuf.
>
> Reported-by: René Scharfe <l.s.r@web.de>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> sha1-file.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/sha1-file.c b/sha1-file.c
> index 5894e48ea4..5a272f70de 100644
> --- a/sha1-file.c
> +++ b/sha1-file.c
> @@ -2169,6 +2169,7 @@ void odb_load_loose_cache(struct object_directory *odb, int subdir_nr)
> NULL, NULL,
> &odb->loose_objects_cache);
> odb->loose_objects_subdir_seen[subdir_nr] = 1;
> + strbuf_release(&buf);
> }
>
> static int check_stream_sha1(git_zstream *stream,
next prev parent reply other threads:[~2018-11-24 2:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-21 9:00 What's cooking in git.git (Nov 2018, #06; Wed, 21) Junio C Hamano
2018-11-21 10:48 ` Ævar Arnfjörð Bjarmason
2018-11-22 17:53 ` Jeff King
2018-11-22 18:36 ` Ævar Arnfjörð Bjarmason
2018-11-24 12:09 ` Jeff King
2018-11-25 2:02 ` Junio C Hamano
2018-11-26 18:13 ` Jeff King
2018-11-24 2:11 ` Junio C Hamano [this message]
2018-11-24 12:06 ` Jeff King
2018-11-21 20:11 ` js/vsts-ci, was " Johannes Schindelin
2018-11-21 23:54 ` Stephen P. Smith
2018-11-22 1:06 ` Junio C Hamano
2018-11-22 2:08 ` Stephen P. Smith
2018-11-22 16:05 ` Linus Torvalds
2018-11-22 10:48 ` Ævar Arnfjörð Bjarmason
2018-11-26 21:57 ` Stefan Beller
2018-11-26 23:34 ` Junio C Hamano
2018-12-05 22:04 ` Matthew DeVore
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=xmqqefbb442v.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=l.s.r@web.de \
--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.
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).