git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Stefan Saasen <ssaasen@atlassian.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [BUG] Performance regression due to #33d4221: write_sha1_file: freshen existing objects
Date: Mon, 20 Apr 2015 15:53:38 -0400	[thread overview]
Message-ID: <20150420195337.GA15447@peff.net> (raw)
In-Reply-To: <CADoxLGOPXDgb0LBcSBm+xRDhbnGV_y-TXENyPV7oK_+KZzPKRQ@mail.gmail.com>

On Sat, Apr 18, 2015 at 01:35:51PM +1000, Stefan Saasen wrote:

> Here are the timings for the two patches:
> [...]

Thanks, that matches what I was hoping for.

> My tweaked version of your second patch is:
> [...]
> -       return find_pack_entry(sha1, &e) && freshen_file(e.p->pack_name);
> +       if (!find_pack_entry(sha1, &e))
> +              return 0;
> +       if (e.p->freshened)
> +              return 1;
> +       return e.p->freshened = freshen_file(e.p->pack_name);
>  }

Whooops, yeah, setting the flag is probably helpful. :)

We usually try to avoid assignments in a return like this, so I've
written it out a little more verbosely in my final version. I'll send
those patches in a moment.

  [1/2]: sha1_file: freshen pack objects before loose
  [2/2]: sha1_file: only freshen packs once per run

> Is there a chance to backport those changes to the 2.2+ branches?

That's up to Junio. These patches can be applied straight to the
jk/prune-mtime topic. Usually he would then merge the topic up to
"maint", which at this would potentially become the next v2.3.x. If an
issue is critical (e.g., a security vulnerability), he'll sometimes
merge and roll maintenance releases for older versions. But I don't know
if this counts as critical (it is for you, certainly, but I don't think
that many people are affected, as the crucial factor here is really the
slow NFS filesystem operations).

-Peff

  reply	other threads:[~2015-04-20 19:53 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-17  7:30 [BUG] Performance regression due to #33d4221: write_sha1_file: freshen existing objects Stefan Saasen
2015-04-17 14:03 ` Jeff King
2015-04-17 15:50   ` Junio C Hamano
2015-04-18  3:35   ` Stefan Saasen
2015-04-20 19:53     ` Jeff King [this message]
2015-04-20 19:54       ` [PATCH 1/2] sha1_file: freshen pack objects before loose Jeff King
2015-04-21  0:46         ` Stefan Saasen
2015-04-20 19:55       ` [PATCH 2/2] sha1_file: only freshen packs once per run Jeff King
2015-04-21  0:45         ` Stefan Saasen
2015-04-20 20:04       ` [BUG] Performance regression due to #33d4221: write_sha1_file: freshen existing objects Junio C Hamano
2015-04-20 20:09         ` Jeff King
2015-04-20 20:12           ` Junio C Hamano
2015-04-20 20:28             ` Jeff King
2015-04-21  1:49           ` Stefan Saasen
2015-04-21 17:05             ` Junio C Hamano
2015-04-21 21:45               ` Junio C Hamano
2015-04-22  1:46                 ` Stefan Saasen
2015-04-22 22:00                   ` Junio C Hamano
2015-04-22  0:04               ` Stefan Saasen

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=20150420195337.GA15447@peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=ssaasen@atlassian.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 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).