)]}'
{
  "commit": "2d1bf87c34a9ec952aac98bc6d88b978abfa9981",
  "tree": "4879ba8f1aa86b332d7f4a0a1c2145d44c3cd572",
  "parents": [
    "318ec1d2db43c1dc1e1810afb8e7fe524d7a64f2"
  ],
  "author": {
    "name": "Takuto Ikuta",
    "email": "tikuta@google.com",
    "time": "Thu Feb 19 23:41:51 2026 +0900"
  },
  "committer": {
    "name": "GN LUCI",
    "email": "gn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Thu Feb 19 07:33:31 2026 -0800"
  },
  "message": "Use high-performance cores on Apple Silicon for worker pool\n\nOn macbook with M4 Max which has 12 high performance + 4 efficient\ncores, using only high performance core is faster than 8 threads for `gn\ngen`. To reduce lock contention in lock for DependencyCache, this also\nintroduces sharding for that.\n\n`gn gen` for build config with 30k targets,\n\n```\n$ hyperfine --warmup 1 \"~/ghq/gn.googlesource.com/gn/out/gn_main gen out/Default\" \"~/ghq/gn.googlesource.com/gn/out/gn_shard gen out/Default\"\nBenchmark 1: ~/ghq/gn.googlesource.com/gn/out/gn_main gen out/Default\n  Time (mean ± σ):      1.962 s ±  0.024 s    [User: 9.090 s, System: 2.124 s]\n  Range (min … max):    1.927 s …  1.997 s    10 runs\n\nBenchmark 2: ~/ghq/gn.googlesource.com/gn/out/gn_shard gen out/Default\n  Time (mean ± σ):      1.818 s ±  0.018 s    [User: 9.632 s, System: 3.990 s]\n  Range (min … max):    1.794 s …  1.848 s    10 runs\n\nSummary\n  ~/ghq/gn.googlesource.com/gn/out/gn_shard gen out/Default ran\n    1.08 ± 0.02 times faster than ~/ghq/gn.googlesource.com/gn/out/gn_main gen out/Default\n```\n\n`gn gen --check` for build config with 30k targets,\n\n```\n$ hyperfine --warmup 1 \"~/ghq/gn.googlesource.com/gn/out/gn_main gen out/Default --check\" \"~/ghq/gn.googlesource.com/gn/out/gn_shard gen out/Default --check\"\nBenchmark 1: ~/ghq/gn.googlesource.com/gn/out/gn_main gen out/Default --check\n  Time (mean ± σ):      6.569 s ±  0.063 s    [User: 21.740 s, System: 15.753 s]\n  Range (min … max):    6.500 s …  6.687 s    10 runs\n\nBenchmark 2: ~/ghq/gn.googlesource.com/gn/out/gn_shard gen out/Default --check\n  Time (mean ± σ):      4.968 s ±  0.035 s    [User: 21.436 s, System: 24.465 s]\n  Range (min … max):    4.903 s …  5.033 s    10 runs\n\nSummary\n  ~/ghq/gn.googlesource.com/gn/out/gn_shard gen out/Default --check ran\n    1.32 ± 0.02 times faster than ~/ghq/gn.googlesource.com/gn/out/gn_main gen out/Default --check\n```\n\n`gn gen` for build config with 40k targets,\n\n```\n$ hyperfine --warmup 1 \"~/ghq/gn.googlesource.com/gn/out/gn_main gen out/no_clang_modules\" \"~/ghq/gn.googlesource.com/gn/out/gn_shard gen out/no_clang_modules\"\nBenchmark 1: ~/ghq/gn.googlesource.com/gn/out/gn_main gen out/no_clang_modules\n  Time (mean ± σ):      2.854 s ±  0.047 s    [User: 13.619 s, System: 3.021 s]\n  Range (min … max):    2.760 s …  2.905 s    10 runs\n\nBenchmark 2: ~/ghq/gn.googlesource.com/gn/out/gn_shard gen out/no_clang_modules\n  Time (mean ± σ):      2.496 s ±  0.028 s    [User: 14.474 s, System: 5.201 s]\n  Range (min … max):    2.458 s …  2.545 s    10 runs\n\nSummary\n  ~/ghq/gn.googlesource.com/gn/out/gn_shard gen out/no_clang_modules ran\n    1.14 ± 0.02 times faster than ~/ghq/gn.googlesource.com/gn/out/gn_main gen out/no_clang_modules\n```\n\n`gn gen --check` for build config with 40k targets,\n\n```\n$ hyperfine --warmup 1 \"~/ghq/gn.googlesource.com/gn/out/gn_main gen out/no_clang_modules --check\" \"~/ghq/gn.googlesource.com/gn/out/gn_shard gen out/no_clang_modules --check\"\nBenchmark 1: ~/ghq/gn.googlesource.com/gn/out/gn_main gen out/no_clang_modules --check\n  Time (mean ± σ):     21.681 s ±  0.178 s    [User: 133.529 s, System: 16.690 s]\n  Range (min … max):   21.454 s … 21.901 s    10 runs\n\nBenchmark 2: ~/ghq/gn.googlesource.com/gn/out/gn_shard gen out/no_clang_modules --check\n  Time (mean ± σ):     15.762 s ±  0.212 s    [User: 143.211 s, System: 26.597 s]\n  Range (min … max):   15.537 s … 16.215 s    10 runs\n\nSummary\n  ~/ghq/gn.googlesource.com/gn/out/gn_shard gen out/no_clang_modules --check ran\n    1.38 ± 0.02 times faster than ~/ghq/gn.googlesource.com/gn/out/gn_main gen out/no_clang_modules --check\n```\n\nThis also improves --check performance on linux,\n\n```\n$ hyperfine --warmup 1 \"~/ghq/gn.googlesource.com/gn/out/gn_main gen out/Default --check\" \"~/ghq/gn.googlesource.com/gn/out/gn_shard gen out/Default --check\"\nBenchmark 1: ~/ghq/gn.googlesource.com/gn/out/gn_main gen out/Default --check\n  Time (mean ± σ):      8.296 s ±  0.136 s    [User: 76.245 s, System: 55.341 s]\n  Range (min … max):    8.106 s …  8.492 s    10 runs\n\nBenchmark 2: ~/ghq/gn.googlesource.com/gn/out/gn_shard gen out/Default --check\n  Time (mean ± σ):      5.575 s ±  0.069 s    [User: 76.813 s, System: 100.234 s]\n  Range (min … max):    5.403 s …  5.653 s    10 runs\n\nSummary\n  ~/ghq/gn.googlesource.com/gn/out/gn_shard gen out/Default --check ran\n    1.49 ± 0.03 times faster than ~/ghq/gn.googlesource.com/gn/out/gn_main gen out/Default --check\n```\n\nBug: 484862257\nBug: 484863025\nChange-Id: I7d54762dcdfaaddb81aff6fdeabb3f7efb3f9590\nReviewed-on: https://gn-review.googlesource.com/c/gn/+/21100\nReviewed-by: David Turner \u003cdigit@google.com\u003e\nReviewed-by: Sylvain Defresne \u003csdefresne@chromium.org\u003e\nCommit-Queue: Takuto Ikuta \u003ctikuta@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "eb07c2270fd4c596242165db0671dece3e6aad29",
      "old_mode": 33261,
      "old_path": "build/gen.py",
      "new_id": "6ad60af4f1d9864101976fe38d9a033a21862e1c",
      "new_mode": 33261,
      "new_path": "build/gen.py"
    },
    {
      "type": "modify",
      "old_id": "d3635915034ac2205c8480dad0f9b7d46e04f344",
      "old_mode": 33188,
      "old_path": "src/gn/header_checker.cc",
      "new_id": "70fd300fbeaada4ab230dff065edb60031ed0489",
      "new_mode": 33188,
      "new_path": "src/gn/header_checker.cc"
    },
    {
      "type": "modify",
      "old_id": "3f313fbf88fc0ac20e35ed87a2522b0cdb3aad05",
      "old_mode": 33188,
      "old_path": "src/gn/header_checker.h",
      "new_id": "8150bdfec689298c62704f4b9d7e4b4edd6fce70",
      "new_mode": 33188,
      "new_path": "src/gn/header_checker.h"
    },
    {
      "type": "modify",
      "old_id": "cc75c45bfa5cbdfdc475bf65ea0cc2324c406a71",
      "old_mode": 33188,
      "old_path": "src/util/sys_info.cc",
      "new_id": "386ba8b439177f89513b55842d283656b2991fcc",
      "new_mode": 33188,
      "new_path": "src/util/sys_info.cc"
    },
    {
      "type": "modify",
      "old_id": "7a6924de4eac1044c60ab68c6603db5b9bffdbd4",
      "old_mode": 33188,
      "old_path": "src/util/sys_info.h",
      "new_id": "904e56884812c99b63b70da16d6edc46d66944a0",
      "new_mode": 33188,
      "new_path": "src/util/sys_info.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "ab39cc86e159f07d4f2f69c4da2179058d219fc4",
      "new_mode": 33188,
      "new_path": "src/util/sys_info_unittest.cc"
    },
    {
      "type": "modify",
      "old_id": "9efc1d28481f0ff653ec49d1c408bdfa5c7d27c6",
      "old_mode": 33188,
      "old_path": "src/util/worker_pool.cc",
      "new_id": "ac903fa2c0f12af069f2345c0ee4f23cfd6b2269",
      "new_mode": 33188,
      "new_path": "src/util/worker_pool.cc"
    }
  ]
}
