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

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

From
Derrick Stolee <stolee@gmail.com>
Date
Feb 25, 2018, 01:41 UTC
Message-ID
<e70fe6eb-994a-66b0-3c20-d19ea6635e07@gmail.com>
In-Reply-To
<1519522496-73090-1-git-send-email-dstolee@microsoft.com>
On 2/24/2018 8:34 PM, Derrick Stolee wrote:
Show 14 quoted lines
> In mark_parents_uninteresting(), we check for the existence of an
> object file to see if we should treat a commit as parsed. The result
> is to set the "parsed" bit on the commit.
>
> Modify the condition to only check has_object_file() if the result
> would change the parsed bit.
>
> When a local branch is different from its upstream ref, "git status"
> will compute ahead/behind counts. This uses paint_down_to_common()
> and hits mark_parents_uninteresting(). On a copy of the Linux repo
> with a local instance of "master" behind the remote branch
> "origin/master" by ~60,000 commits, we find the performance of
> "git status" went from 1.42 seconds to 1.32 seconds, for a relative
> difference of -7.0%.

I do want to add that the exact same "git status" performance test with the commit-graph feature goes from 0.29 seconds to 0.21 seconds for a relative change of -27.5%.

Thanks,
-Stolee
Previous: Derrick StoleeNext: Jeff King
Message 2 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.