)]}'
{
  "commit": "d22fcc2f99103f9889eff7ea1d60da606c87abb6",
  "tree": "0eb41bf28f94424a16e7496971f564742d8e6850",
  "parents": [
    "c448ae220c75af3663751ab53a711c9377ced94a"
  ],
  "author": {
    "name": "Martin Fick",
    "email": "martin.fick@linaro.org",
    "time": "Tue Aug 02 17:06:11 2022 -0600"
  },
  "committer": {
    "name": "Martin Fick",
    "email": "martin.fick@linaro.org",
    "time": "Wed Sep 14 09:53:11 2022 -0600"
  },
  "message": "Cache MatchCache results for all changes\n\nSince walking changes ends up repeating many matches for the same\nchanges, store the results for all change matches instead of throwing\nthem away when moving to a new change. Although this change ends up\nstoring significantly more results, the space needs of this change\nshould not grow unreasonably. The approximate growth should be by the\nsize of a HashMap by query Strings populated with an Integer to point to\nthe results, plus a pointer to two bits sets per query, plus\napproximately 2 bits per change (in the worse case) due to the space\nefficient BitMap based Table used to store these results.\n\nIn a massive real world case where there are likely around 34K changes\nand approximately max 6K query results per change (2K tasks * 3\nqueries). The extra storage for the HashMap likely works out likely\naround at least 1.6MB + the size of the query Strings, i.e. likely less\nthan 34MB. The Pointers to the BitMaps will likely use around 6K queries\n* 16B \u003d 96K. And finally, an additional 8K for the result BitMaps. This\nlikely adds up to around 36MB for a status:open --task--aplicable query.\nThis should give a good enough picture to show that this should not have\na serious impact on memory, and testing confirms that is the case.\n\nIn the sample walking ancestors this caching saves a small but\nmeasurable amount of the total time. In the case of a task.config which\nwalks all dependencies for a change when run with status:open --no-limit\n--task--applicable the gain can be seen below.\n\nBefore this change: 4m18s 4m4s 4m37s 3m56s 4m5s\nAfter this change:  3m37s 3m34s 4m6s 6m23s 3m42s\n\nChange-Id: I5b2d2b948e30a2f410be3a400522b9d3db045518\n",
  "tree_diff": [
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "9e89eb926089f72d7702d9a7a0b2de7c7248c4f5",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/gerrit/common/BooleanTable.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "8271fb99af8e9b133aeaf02d0941ae4d7c9c62af",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/task/HitBooleanTable.java"
    },
    {
      "type": "modify",
      "old_id": "ef5af15fd4fb281914912dc024781d42df893003",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/task/MatchCache.java",
      "new_id": "7bdb95d081d3ec8f42b0b337566884fbd9c5de9b",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/task/MatchCache.java"
    },
    {
      "type": "modify",
      "old_id": "2821123fe530a0cc41ce3059038f2cfb01042b94",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/task/TaskAttributeFactory.java",
      "new_id": "ec73199b5fa9b57157a98d25ab78446bc12dae4e",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/task/TaskAttributeFactory.java"
    },
    {
      "type": "modify",
      "old_id": "2b89f90ef1180bee0817e121f4008cb12c435813",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/task/TaskTree.java",
      "new_id": "bbca661746e94e31af0ffa0148f17c279f5c25b0",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/task/TaskTree.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "746a0e94faafbf5f050dc8477c499e8bd517dd84",
      "new_mode": 33188,
      "new_path": "src/test/java/com/google/gerrit/common/BooleanTableTest.java"
    }
  ]
}
