)]}'
{
  "commit": "f031c0978b4a9734db14e3c75a9a7463ff6ce525",
  "tree": "896143746bf3d35bf38d574c95ea831aa801c01b",
  "parents": [
    "38eb2a1b71f55281f8e4b6043fe8864411c45383"
  ],
  "author": {
    "name": "Andrew Grieve",
    "email": "agrieve@google.com",
    "time": "Wed Jun 04 10:09:53 2025 -0400"
  },
  "committer": {
    "name": "GN LUCI",
    "email": "gn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Wed Jun 04 07:23:52 2025 -0700"
  },
  "message": "Optimize Target::EnsureFileIsGeneratedByDependency()\n\nFor targets with a large number of generated inputs, it\u0027s very common\nfor those generated inputs to be generated by the same target, and for\nthem to be listed in the same order within that target. As such, start\nthe search for subsequent generated sources where the previous one was\nfound.\n\nIn Chromium, some large target onresolve() steps were taking 500-800ms\non my machine to run this check. With this change, they now take ~1ms.\n\n//third_party/blink/renderer/bindings/modules/v8:v8 was the slowest one.\nIt has a large tree of public_deps, and lot of generated source files\n(~5000), and has deps with a large number of outputs (mojom).\n\nI at first tried creating creating an unordered_set\u003cOutputFile\u003e for\ntargets with large number of outputs, but that did not noticeably\nimprove runtime.\n\nHyperfine Benchmark from Chromium:\nBefore:\n  Time (mean ± σ):      8.001 s ±  0.203 s    [User: 62.682 s, System: 53.541 s]\n  Range (min … max):    7.773 s …  8.362 s    10 runs\n\nAfter:\n  Time (mean ± σ):      7.349 s ±  0.251 s    [User: 66.903 s, System: 50.486 s]\n  Range (min … max):    6.974 s …  7.655 s    10 runs\n\n\nBug: chromium:398002893\nChange-Id: I4989052ecaf6e3cc4ad2acb4cb5c94e98e83c5a1\nReviewed-on: https://gn-review.googlesource.com/c/gn/+/18960\nReviewed-by: David Turner \u003cdigit@google.com\u003e\nCommit-Queue: Andrew Grieve \u003cagrieve@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ca084595e57422991c8fe909cf0192e0db8788a7",
      "old_mode": 33188,
      "old_path": "src/gn/target.cc",
      "new_id": "bc8bae1cae93ffdc4d6344a018dca7a7f351309b",
      "new_mode": 33188,
      "new_path": "src/gn/target.cc"
    },
    {
      "type": "modify",
      "old_id": "b6947f9c5747571867eba06b59e1d005f0e12706",
      "old_mode": 33188,
      "old_path": "src/gn/target.h",
      "new_id": "4b0bed975f9309882df5b2a6ae57bfeb025b7a5b",
      "new_mode": 33188,
      "new_path": "src/gn/target.h"
    }
  ]
}
