)]}'
{
  "commit": "218aa3a6162b80696a82b8745daa38fa826985ae",
  "tree": "121e108764f44f3dcd13e566cd44c8e9a0fa59b5",
  "parents": [
    "8597ea3afea067b39ba7d4adae7ec6c1ee0e7c91"
  ],
  "author": {
    "name": "Jeff King",
    "email": "peff@peff.net",
    "time": "Fri Jun 13 02:32:11 2014 -0400"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Fri Jun 13 12:10:13 2014 -0700"
  },
  "message": "reuse cached commit buffer when parsing signatures\n\nWhen we call show_signature or show_mergetag, we read the\ncommit object fresh via read_sha1_file and reparse its\nheaders. However, in most cases we already have the object\ndata available, attached to the \"struct commit\". This is\npartially laziness in dealing with the memory allocation\nissues, but partially defensive programming, in that we\nwould always want to verify a clean version of the buffer\n(not one that might have been munged by other users of the\ncommit).\n\nHowever, we do not currently ever munge the commit buffer,\nand not using the already-available buffer carries a fairly\nbig performance penalty when we are looking at a large\nnumber of commits. Here are timings on linux.git:\n\n  [baseline, no signatures]\n  $ time git log \u003e/dev/null\n  real    0m4.902s\n  user    0m4.784s\n  sys     0m0.120s\n\n  [before]\n  $ time git log --show-signature \u003e/dev/null\n  real    0m14.735s\n  user    0m9.964s\n  sys     0m0.944s\n\n  [after]\n  $ time git log --show-signature \u003e/dev/null\n  real    0m9.981s\n  user    0m5.260s\n  sys     0m0.936s\n\nNote that our user CPU time drops almost in half, close to\nthe non-signature case, but we do still spend more\nwall-clock and system time, presumably from dealing with\ngpg.\n\nAn alternative to this is to note that most commits do not\nhave signatures (less than 1% in this repo), yet we pay the\nre-parsing cost for every commit just to find out if it has\na mergetag or signature. If we checked that when parsing the\ncommit initially, we could avoid re-examining most commits\nlater on. Even if we did pursue that direction, however,\nthis would still speed up the cases where we _do_ have\nsignatures. So it\u0027s probably worth doing either way.\n\nSigned-off-by: Jeff King \u003cpeff@peff.net\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a036e181c7f9ff391052b0ca5d82d06310abdf88",
      "old_mode": 33188,
      "old_path": "commit.c",
      "new_id": "ebd7ad8465672004c56386de686d9ba7ff0eccdb",
      "new_mode": 33188,
      "new_path": "commit.c"
    },
    {
      "type": "modify",
      "old_id": "61559a9d45d67f3fad012c74b2a7643d185e87b3",
      "old_mode": 33188,
      "old_path": "commit.h",
      "new_id": "2e1492a6e4d1c5fc5bea3a48180f128601c3461e",
      "new_mode": 33188,
      "new_path": "commit.h"
    },
    {
      "type": "modify",
      "old_id": "444702163a0e80a5583c1bf3a82fa96e0da698fd",
      "old_mode": 33188,
      "old_path": "log-tree.c",
      "new_id": "10e68442b35c9bd9ca1c00c52609a4827b8bace5",
      "new_mode": 33188,
      "new_path": "log-tree.c"
    }
  ]
}
