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

Re: [BUG] Performance regression due to #33d4221: write_sha1_file: freshen existing objects

From
Jeff King <peff@peff.net>
Date
Apr 20, 2015, 19:53 UTC
Message-ID
<20150420195337.GA15447@peff.net>
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.
Show 9 quoted lines
> 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
Previous: Stefan SaasenNext: Jeff King
Message 5 of 19 in “[BUG] Performance regression due to #33d4221: write_sha1_file: freshen existing objects”
  1. Stefan SaasenApr 17, 2015
  2. Jeff KingApr 17, 2015
  3. Junio C HamanoApr 17, 2015
  4. Stefan SaasenApr 18, 2015
  5. Jeff KingApr 20, 2015
  6. 1/2 sha1_file: freshen pack objects before looseJeff King, Apr 20, 2015
  7. Stefan SaasenApr 21, 2015
  8. 2/2 sha1_file: only freshen packs once per runJeff King, Apr 20, 2015
  9. Stefan SaasenApr 21, 2015
  10. Junio C HamanoApr 20, 2015
  11. Jeff KingApr 20, 2015
  12. Junio C HamanoApr 20, 2015
  13. Jeff KingApr 20, 2015
  14. Stefan SaasenApr 21, 2015
  15. Junio C HamanoApr 21, 2015
  16. Junio C HamanoApr 21, 2015
  17. Stefan SaasenApr 22, 2015
  18. Junio C HamanoApr 22, 2015
  19. Stefan SaasenApr 22, 2015

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.