From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Derrick Stolee <dstolee@microsoft.com>, git@vger.kernel.org
Subject: Re: [PATCH] revision.c: reduce object database queries
Date: Tue, 27 Feb 2018 15:16:58 -0800 [thread overview]
Message-ID: <xmqqefl6nhud.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20180226013822.GA9385@sigill.intra.peff.net> (Jeff King's message of "Sun, 25 Feb 2018 20:38:22 -0500")
Jeff King <peff@peff.net> writes:
>> This code comes originally form 454fbbcde3 (git-rev-list: allow missing
>> objects when the parent is marked UNINTERESTING, 2005-07-10). But later,
>> in aeeae1b771 (revision traversal: allow UNINTERESTING objects to be
>> missing, 2009-01-27), we marked dealt with calling parse_object() on the
>> parents more directly.
>>
>> So what I wonder is whether this code is simply redundant and can go
>> away entirely. That would save the has_object_file() call in all cases.
Hmm, interesting. I forgot all what I did around this area, but you
are right.
> There's a similar case for trees. ...
> though technically the existing code allows _missing_ trees, but
> not on corrupt ones.
True, but the intention of these "do not care too much about missing
stuff while marking uninteresting" effort is aligned better with
ignoring corrupt ones, too, I would think, as "missing" in that
sentence is in fact about "not availble", and stuff that exists in
corrupt form is still not available anyway. So I do not think it
makes a bad change to start allowing corrupt ones.
> I guess this is perhaps less interesting, because we only mark trees
> directly fed from the pending array, not every tree of commits that we
> traverse. Though if you had a really gigantic tree, it might be
> measurable.
I tend to agree that this is less interesting case than commits.
A huge tree with millions of entries in a single level would spend
quite a lot of cycle in slurping the tree data to in-core buffer,
but we do not actually parse these million entries upon opening the
tree, so it may not be too bad.
next prev parent reply other threads:[~2018-02-27 23:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-25 1:34 [PATCH] revision.c: reduce object database queries Derrick Stolee
2018-02-25 1:41 ` Derrick Stolee
2018-02-26 1:30 ` Jeff King
2018-02-26 1:38 ` Jeff King
2018-02-27 23:16 ` Junio C Hamano [this message]
2018-02-28 6:37 ` Jeff King
2018-02-28 13:34 ` Derrick Stolee
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=xmqqefl6nhud.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=dstolee@microsoft.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).