)]}'
{
  "commit": "540cdc11adf0574a9a2d52fc687a84a2f4a93ad8",
  "tree": "cacc5c0235589d2a1e5fda48d113bd529c7fd5f6",
  "parents": [
    "94f6e3e283f2adfc518b39cfc39291f1c2832ad0"
  ],
  "author": {
    "name": "Patrick Steinhardt",
    "email": "ps@pks.im",
    "time": "Mon Mar 22 13:19:06 2021 +0100"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Mon Mar 22 12:10:56 2021 -0700"
  },
  "message": "pack-bitmap: avoid traversal of objects referenced by uninteresting tag\n\nWhen preparing the bitmap walk, we first establish the set of of have\nand want objects by iterating over the set of pending objects: if an\nobject is marked as uninteresting, it\u0027s declared as an object we already\nhave, otherwise as an object we want. These two sets are then used to\ncompute which transitively referenced objects we need to obtain.\n\nOne special case here are tag objects: when a tag is requested, we\nresolve it to its first not-tag object and add both resolved objects as\nwell as the tag itself into either the have or want set. Given that the\nuninteresting-property always propagates to referenced objects, it is\nclear that if the tag is uninteresting, so are its children and vice\nversa. But we fail to propagate the flag, which effectively means that\nreferenced objects will always be interesting except for the case where\nthey have already been marked as uninteresting explicitly.\n\nThis mislabeling does not impact correctness: we now have it in our\n\"wants\" set, and given that we later do an `AND NOT` of the bitmaps of\n\"wants\" and \"haves\" sets it is clear that the result must be the same.\nBut we now start to needlessly traverse the tag\u0027s referenced objects in\ncase it is uninteresting, even though we know that each referenced\nobject will be uninteresting anyway. In the worst case, this can lead to\na complete graph walk just to establish that we do not care for any\nobject.\n\nFix the issue by propagating the `UNINTERESTING` flag to pointees of tag\nobjects and add a benchmark with negative revisions to p5310. This shows\nsome nice performance benefits, tested with linux.git:\n\nTest                                                          HEAD~                  HEAD\n---------------------------------------------------------------------------------------------------------------\n5310.3: repack to disk                                        193.18(181.46+16.42)   194.61(183.41+15.83) +0.7%\n5310.4: simulated clone                                       25.93(24.88+1.05)      25.81(24.73+1.08) -0.5%\n5310.5: simulated fetch                                       2.64(5.30+0.69)        2.59(5.16+0.65) -1.9%\n5310.6: pack to file (bitmap)                                 58.75(57.56+6.30)      58.29(57.61+5.73) -0.8%\n5310.7: rev-list (commits)                                    1.45(1.18+0.26)        1.46(1.22+0.24) +0.7%\n5310.8: rev-list (objects)                                    15.35(14.22+1.13)      15.30(14.23+1.07) -0.3%\n5310.9: rev-list with tag negated via --not --all (objects)   22.49(20.93+1.56)      0.11(0.09+0.01) -99.5%\n5310.10: rev-list with negative tag (objects)                 0.61(0.44+0.16)        0.51(0.35+0.16) -16.4%\n5310.11: rev-list count with blob:none                        12.15(11.19+0.96)      12.18(11.19+0.99) +0.2%\n5310.12: rev-list count with blob:limit\u003d1k                    17.77(15.71+2.06)      17.75(15.63+2.12) -0.1%\n5310.13: rev-list count with tree:0                           1.69(1.31+0.38)        1.68(1.28+0.39) -0.6%\n5310.14: simulated partial clone                              20.14(19.15+0.98)      19.98(18.93+1.05) -0.8%\n5310.16: clone (partial bitmap)                               12.78(13.89+1.07)      12.72(13.99+1.01) -0.5%\n5310.17: pack to file (partial bitmap)                        42.07(45.44+2.72)      41.44(44.66+2.80) -1.5%\n5310.18: rev-list with tree filter (partial bitmap)           0.44(0.29+0.15)        0.46(0.32+0.14) +4.5%\n\nWhile most benchmarks are probably in the range of noise, the newly\nadded 5310.9 and 5310.10 benchmarks consistenly perform better.\n\nSigned-off-by: Patrick Steinhardt \u003cps@pks.im\u003e.\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4077e731e800c52548243452e9a5cf715a8f43b0",
      "old_mode": 33188,
      "old_path": "pack-bitmap.c",
      "new_id": "2d3bc415da622452931cf8f4889ecf3e6ca4c092",
      "new_mode": 33188,
      "new_path": "pack-bitmap.c"
    },
    {
      "type": "modify",
      "old_id": "b3e725f0310a7b4d8343089de922c7eb6d148a52",
      "old_mode": 33261,
      "old_path": "t/perf/p5310-pack-bitmaps.sh",
      "new_id": "452be01056c6b4797958809036811984634ace7d",
      "new_mode": 33261,
      "new_path": "t/perf/p5310-pack-bitmaps.sh"
    }
  ]
}
