git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: Derrick Stolee <dstolee@microsoft.com>, git@vger.kernel.org
Cc: gitster@pobox.com, peff@peff.net
Subject: Re: [PATCH] revision.c: reduce object database queries
Date: Sat, 24 Feb 2018 20:41:02 -0500	[thread overview]
Message-ID: <e70fe6eb-994a-66b0-3c20-d19ea6635e07@gmail.com> (raw)
In-Reply-To: <1519522496-73090-1-git-send-email-dstolee@microsoft.com>

On 2/24/2018 8:34 PM, Derrick Stolee wrote:
> 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



  reply	other threads:[~2018-02-25  1:41 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 [this message]
2018-02-26  1:30 ` Jeff King
2018-02-26  1:38   ` Jeff King
2018-02-27 23:16     ` Junio C Hamano
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=e70fe6eb-994a-66b0-3c20-d19ea6635e07@gmail.com \
    --to=stolee@gmail.com \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --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).