)]}'
{
  "commit": "7cca172268c748fd5f96ccd37ce1d0e8951423c7",
  "tree": "ff5b1a4463d4a8e0f88bf6502f6f9a50de93d333",
  "parents": [
    "6a795a4b8ad707ac8306967ec6695c7f0e1b5304"
  ],
  "author": {
    "name": "Jason Bedard",
    "email": "jason+github@jbedard.ca",
    "time": "Wed Aug 26 15:13:24 2026 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Aug 26 15:13:24 2026 -0700"
  },
  "message": "perf: skip comment assignment when no comments exist (#1473)\n\nIn a large repo this made a _minor_ difference in memory consumption on\ngazelle invocations. This is minor enough it may not be worth it, or\nmaybe only the first commit is worth the extra code.\n\nThe first commit is simpler and has the largest gain in my large repo,\nbut doesn\u0027t cover as wide of a range of cases.\n\nRobot summary of results:\n```\n  ┌────────────────────────────────────────────────────┬───────────────┬─────────┐\n  │                       build                        │ order() alloc │ vs base │\n  ├────────────────────────────────────────────────────┼───────────────┼─────────┤\n  │ base (no buildtools change)                        │ 137.6 MB      │ —       │\n  ├────────────────────────────────────────────────────┼───────────────┼─────────┤\n  │ commit 1 (guard: skip when no comments)            │ 60.7 MB       │ −56%    │\n  ├────────────────────────────────────────────────────┼───────────────┼─────────┤\n  │ commit 1 + 2 (guard + finer-grained split)         │ 42.1 MB       │ −69%    │\n  └────────────────────────────────────────────────────┴───────────────┴─────────┘\n```\n\n## Buildtools PR checklist\n\n- [x] The code in this PR is covered by unit/integration tests.\n- [x] I have tested these changes and provide testing instructions\nbelow.\n- [x] I have either responded to, or resolved all Gemini comments on the\nPR.\n- [x] I have read Google Eng Practices on [Small\nChanges](https://google.github.io/eng-practices/review/developer/small-cls.html),\nthis PR either follows these guidelines or the description provides\nreasoning for why they can not be followed.\n\n## Description\n\n`assignComments` previously walked the full syntax tree on every parse,\nbuilding preorder and postorder node lists used to attach line and\nsuffix comments.\n\nThis change skips the walking and `pre/post` construction when no\ncomments exists.\n\n### (optional) These changes were tested using the following steps\n\nbazel tests, patching the go.mod when invoking gazelle in a large repo\nwhile profiling memory/GC",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f56fe2f01219a1ed7289e4ffa161f61576291ecd",
      "old_mode": 33188,
      "old_path": "build/lex.go",
      "new_id": "0fba2e35aa1890841dd2c6f61d484efcf64b4640",
      "new_mode": 33188,
      "new_path": "build/lex.go"
    }
  ]
}
