All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Jonathan Tan <jonathantanmy@google.com>,
	git@vger.kernel.org, stolee@gmail.com
Subject: Re: [PATCH v2] cache-tree: do not lazy-fetch merge tree
Date: Mon, 09 Sep 2019 18:09:51 -0700	[thread overview]
Message-ID: <xmqqwoehgdnk.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20190909222101.GB31319@sigill.intra.peff.net> (Jeff King's message of "Mon, 9 Sep 2019 18:21:01 -0400")

Jeff King <peff@peff.net> writes:

> I wondered also if this means we should be using OBJECT_INFO_QUICK.
> I.e., do we expect to see a "miss" here often, forcing us to re-scan the
> packed directory?

As a performance optimization hack, it is OK if we did not notice
that the tree object, which corresponds to what is currently
prepared for a directory in the index, does exist in the object
store.  It is not worth rescanning the packs to "protect" against
races, I think, in the "repair" codepath.

When the user actually wants to write the index out as a tree, we
would write it out as a loose object (or omit doing so if we know
there are already copies), but because it is not a crime to create a
duplicate loose object when we already have a packed copy, I do not
think we need to rescan in that context, either.  But I do not think
the codepath Jonathan's patch touches is about that operation.

  reply	other threads:[~2019-09-10  1:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-03 19:42 [PATCH] cache-tree: do not lazy-fetch merge tree Jonathan Tan
2019-09-04  1:37 ` Derrick Stolee
2019-09-04 22:35   ` Jonathan Tan
2019-09-04 23:35     ` Junio C Hamano
2019-09-09 19:01 ` [PATCH v2] " Jonathan Tan
2019-09-09 19:55   ` Junio C Hamano
2019-09-09 21:05     ` Junio C Hamano
2019-09-09 22:21       ` Jeff King
2019-09-10  1:09         ` Junio C Hamano [this message]
2019-09-10 18:15       ` Jonathan Tan
2019-09-10 12:49   ` SZEDER Gábor
2019-09-10 18:19     ` Jonathan Tan

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=xmqqwoehgdnk.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jonathantanmy@google.com \
    --cc=peff@peff.net \
    --cc=stolee@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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.