git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] revision.c: reduce object database queries

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 27, 2018, 23:16 UTC
Message-ID
<xmqqefl6nhud.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20180226013822.GA9385@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 8 quoted lines
>> 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.

Previous: Jeff KingNext: Jeff King
Message 5 of 7 in “revision.c: reduce object database queries”
  1. revision.c: reduce object database queriesDerrick Stolee, Feb 25, 2018
  2. Derrick StoleeFeb 25, 2018
  3. Jeff KingFeb 26, 2018
  4. Jeff KingFeb 26, 2018
  5. Junio C HamanoFeb 27, 2018
  6. Jeff KingFeb 28, 2018
  7. Derrick StoleeFeb 28, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.