)]}'
{
  "commit": "d1b9b76734d2ec31d41ba6e7beddab7c880dff85",
  "tree": "f26642620873a20bec10dbf72677a3707fe2cb4d",
  "parents": [
    "9a82efd0d2a2727507bd908d7f0545437fcc0ff6"
  ],
  "author": {
    "name": "Thomas Rast",
    "email": "trast@student.ethz.ch",
    "time": "Thu Mar 28 09:19:34 2013 +0100"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Thu Mar 28 07:45:21 2013 -0700"
  },
  "message": "Avoid loading commits twice in log with diffs\n\nIf you run a log with diffs (such as -p, --raw, --stat etc.) the\ncurrent code ends up loading many objects twice.  For example, for\n\u0027log -3000 -p\u0027 my instrumentation said the objects loaded more than\nonce are distributed as follows:\n\n  2008 blob\n  2103 commit\n  2678 tree\n\nFixing blobs and trees will be harder, because those are really used\nwithin the diff engine and need some form of caching.\n\nHowever, fixing the commits is easy at least at the band-aid level.\nThey are triggered by log_tree_diff() invoking diff_tree_sha1() on\ncommits, which duly loads the specified object to dereference it to a\ntree.  Since log_tree_diff() knows that it works with commits and they\nmust have trees, we can simply pass through the trees.\n\nWe add some parse_commit() calls.  The ones for the parents are\nrequired; we do not know at this stage if they have been looked at.\nThe one for the commit itself is pure paranoia, but has about the same\ncost as an assertion on commit-\u003eobject.parsed.\n\nThis has a quite dramatic effect on log --raw, though only a\nnegligible impact on log -p:\n\nTest                      this tree         HEAD\n--------------------------------------------------------------------\n4000.2: log --raw -3000   0.50(0.43+0.06)   0.54(0.46+0.06) +7.0%***\n4000.3: log -p -3000      2.34(2.20+0.13)   2.37(2.22+0.13) +1.2%\n--------------------------------------------------------------------\nSignificance hints:  \u0027.\u0027 0.1  \u0027*\u0027 0.05  \u0027**\u0027 0.01  \u0027***\u0027 0.001\n\nSigned-off-by: Thomas Rast \u003ctrast@student.ethz.ch\u003e\nSigned-off-by: Thomas Rast \u003ctrast@inf.ethz.ch\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5dc45c4812bdfd0d7a6b71d529eaa37df8178186",
      "old_mode": 33188,
      "old_path": "log-tree.c",
      "new_id": "8a34332e6df0d7a95406bf4f1c7772ce7fe14339",
      "new_mode": 33188,
      "new_path": "log-tree.c"
    }
  ]
}
