)]}'
{
  "commit": "ecf9ba20e35ded94d6b1f44f83bb9f7c32162654",
  "tree": "8c043544dcf6659cce92ce3335f14b4fa163c78f",
  "parents": [
    "efab7dc1f49ef95f00560c30bca357dd445e7cb4"
  ],
  "author": {
    "name": "Derrick Stolee",
    "email": "stolee@gmail.com",
    "time": "Fri May 16 14:55:30 2025 +0000"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Fri May 16 12:02:47 2025 -0700"
  },
  "message": "p2000: add performance test for patch-mode commands\n\nThe previous three changes contributed performance improvements to \u0027git\napply\u0027, \u0027git add -p\u0027, and \u0027git reset -p\u0027 when using a sparse index. The\nimprovement to \u0027git apply\u0027 also improved \u0027git checkout -p\u0027. Add\nperformance tests to demonstrate this (and to help validate that\nperformance remains good in the future).\n\nIn the truncated test output below, we see that the full checkout\nperformance changes within noise expectations, but the sparse index\ncases improve 33% and then 96% for \u0027git add -p\u0027 and 41% and then 95% for\n\u0027git reset -p\u0027. \u0027git checkout -p\u0027 improves immediatley by 91% because it\ndoes not need any change to its builtin.\n\n  Test                                    HEAD~4  HEAD~3       HEAD~2       HEAD~1\n  -------------------------------------------------------------------------------------\n  2000.118: ... git add -p (full-v3)        0.79  0.79  +0.0%  0.82  +3.8%  0.82  +3.8%\n  2000.119: ... git add -p (full-v4)        0.74  0.76  +2.7%  0.74  +0.0%  0.76  +2.7%\n  2000.120: ... git add -p (sparse-v3)      1.94  1.28 -34.0%  0.07 -96.4%  0.07 -96.4%\n  2000.121: ... git add -p (sparse-v4)      1.93  1.28 -33.7%  0.06 -96.9%  0.06 -96.9%\n  2000.122: ... git checkout -p (full-v3)   1.18  1.18  +0.0%  1.18  +0.0%  1.19  +0.8%\n  2000.123: ... git checkout -p (full-v4)   1.10  1.12  +1.8%  1.11  +0.9%  1.11  +0.9%\n  2000.124: ... git checkout -p (sparse-v3) 1.31  0.11 -91.6%  0.11 -91.6%  0.11 -91.6%\n  2000.125: ... git checkout -p (sparse-v4) 1.29  0.11 -91.5%  0.11 -91.5%  0.11 -91.5%\n  2000.126: ... git reset -p (full-v3)      0.81  0.80  -1.2%  0.83  +2.5%  0.83  +2.5%\n  2000.127: ... git reset -p (full-v4)      0.78  0.77  -1.3%  0.77  -1.3%  0.78  +0.0%\n  2000.128: ... git reset -p (sparse-v3)    1.58  0.92 -41.8%  0.91 -42.4%  0.07 -95.6%\n  2000.129: ... git reset -p (sparse-v4)    1.58  0.92 -41.8%  0.92 -41.8%  0.07 -95.6%\n\nIt is worth noting that if our test was more involved and had multiple\nhunks to evaluate, then the time spent in \u0027git apply\u0027 would dominate due\nto multiple index loads and writes. As it stands, we need the sparse\nindex improvement in \u0027git add -p\u0027 itself to confirm this performance\nimprovement.\n\nSince the change for \u0027git add -i\u0027 is identical, we avoid a second test\ncase for that similar operation.\n\nSigned-off-by: Derrick Stolee \u003cstolee@gmail.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "39e92b0841437bee9cbd939de6e216fae81a7ff2",
      "old_mode": 33261,
      "old_path": "t/perf/p2000-sparse-operations.sh",
      "new_id": "aadf22bc2f0bb29f0dfe390d5554a1901337f98d",
      "new_mode": 33261,
      "new_path": "t/perf/p2000-sparse-operations.sh"
    }
  ]
}
