)]}'
{
  "commit": "5649e56e9e325ab8def3304906870ed4c5b397ca",
  "tree": "fdbedbec7455b7501d2d5fb5da817f1f9662d519",
  "parents": [
    "2ab81981a83bb790d40305773284476e8d7bef4c"
  ],
  "author": {
    "name": "Takuto Ikuta",
    "email": "tikuta@google.com",
    "time": "Tue Sep 15 16:12:58 2026 +0900"
  },
  "committer": {
    "name": "gn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "email": "gn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Tue Sep 15 17:08:31 2026 -0700"
  },
  "message": "[gn] Use std::unordered_map for waiting_map_\n\nPreviously, BuilderRecord::waiting_map_ was a base::flat_map. For\nheavily depended-upon targets (such as core libraries like //base:base\nand popular configs) that have thousands of dependents, inserting a new\ndependent in waiting_map_ caused a binary search followed by an O(N)\nmemmove of all subsequent elements to keep the flat_map sorted.\n\nOnce StringAtomSet global lock contention is eliminated, worker threads\nparse and submit targets to the Builder at a much higher rate, making\nthese O(N) memmove insertions a major bottleneck on the main thread.\n\nHowever, waiting_map_ only requires point lookup by pointer and full\ntraversals to notify dependents of state changes; it never requires\nsorted order (and functions like GetSortedUnresolvedDeps already sort\ntheir output explicitly).\n\nSwitching to std::unordered_map eliminates the array shifts on insertion.\n\nBenchmark results (`gn gen out/Default` on Chromium, 5 runs with hyperfine,\nofficial release build configuration with Fuchsia Clang + libc++ +\nstatic libjemalloc.a + LTO):\n- Stacked on StringAtomSet sharding (CL 26540):\n  2.258s ± 0.035s -\u003e 2.060s ± 0.064s (-198ms / -8.8%, min 2.011s)\n- Compared to origin/main:\n  2.755s ± 0.029s -\u003e 2.060s ± 0.064s (-695ms / 1.34x faster)\n\nOutput ninja files remain bit-for-bit identical across all 14,639 files.\n\nTAG\u003dagy\nCONV\u003d4cb5d931-60a8-4f44-8632-3e8d9fb10a8d\n\nChange-Id: I3174ee798a5f6d0c58736fc05ad4ed2684b1d37c\nReviewed-on: https://gn-review.googlesource.com/c/gn/+/26560\nReviewed-by: Matt Stark \u003cmsta@google.com\u003e\nCommit-Queue: Takuto Ikuta \u003ctikuta@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "52d4816123bb037b9bd53d2618e494d8fd5a29ab",
      "old_mode": 33188,
      "old_path": "src/gn/builder_record.h",
      "new_id": "b2bef55cc3864e026927c0622e837f93d468fb65",
      "new_mode": 33188,
      "new_path": "src/gn/builder_record.h"
    }
  ]
}
