)]}'
{
  "commit": "98f6dd2be85d0eba8f31ee3ad1def5402383cff3",
  "tree": "c59c9fd18867e0150ea478a8f0be41e273221482",
  "parents": [
    "d3d07d398e3c682afa103b0c6db29b16cd83b098"
  ],
  "author": {
    "name": "Matt Stark",
    "email": "msta@google.com",
    "time": "Thu Oct 29 11:57:11 2026 +1100"
  },
  "committer": {
    "name": "gn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "email": "gn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Wed Oct 28 19:11:42 2026 -0700"
  },
  "message": "Improve performance of StringOutputBuffer.\n\nStringOutputBuffer previously used a (start, size, capacity) representation\nfor the current read-write page, updating an offset index on each write.\nThis had two main drawbacks:\n1) Every write required base + offset address recalculations.\n2) Writable::WriteToBuf took a `size_t\u0026 upto` parameter alongside the\n   `char buf[]`, creating a strict-aliasing hazard.\n\nThis change optimizes StringOutputBuffer:\n- Adopts a 3-pointer cursor representation (rw_buf_, cur_, end_). In the\n  hot path, writes only advance cur_, keeping the write pointer directly\n  in CPU registers across chained writes.\n- Updates Writable and WriteToBuf to take and return a char*, eliminating\n  both the aliasing hazard and offset arithmetic.\n- Splits Reserve into an inlined fast-path check (zero function calls on\n  the hot path) and an out-of-line ReserveSlow for page rollover.\n- Removes redundant state (ro_size_ and rw_capacity_), computing total\n  size on demand.\n- Simplifies str(), WriteToFile(), and ContentsEqual() to stream the\n  active page using direct pointer ranges.\n\nChange-Id: I56da598fa9acfe31443b2049bbcd48e66a6a6964\nReviewed-on: https://gn-review.googlesource.com/c/gn/+/28180\nReviewed-by: Takuto Ikuta \u003ctikuta@google.com\u003e\nCommit-Queue: Matt Stark \u003cmsta@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "61c41ef4303a69245aff7aa3047b244cdf30accd",
      "old_mode": 33188,
      "old_path": "src/gn/escape.cc",
      "new_id": "7c633fe37ece3218d98c18b1f23cdce31bb084ca",
      "new_mode": 33188,
      "new_path": "src/gn/escape.cc"
    },
    {
      "type": "modify",
      "old_id": "f32bf333fa76870e2b29fc59ff046546f1c3f7ec",
      "old_mode": 33188,
      "old_path": "src/gn/escape.h",
      "new_id": "fd316dc3fca3451f05520f8f897fac89827a4a78",
      "new_mode": 33188,
      "new_path": "src/gn/escape.h"
    },
    {
      "type": "modify",
      "old_id": "85bda0fe6cfa7d4c79ad32163d785619da632616",
      "old_mode": 33188,
      "old_path": "src/gn/string_output_buffer.cc",
      "new_id": "21614dee0b072837e4edfa6737dd88e7110cc726",
      "new_mode": 33188,
      "new_path": "src/gn/string_output_buffer.cc"
    },
    {
      "type": "modify",
      "old_id": "102670df7d52d466f54a1e5defcf12c538388272",
      "old_mode": 33188,
      "old_path": "src/gn/string_output_buffer.h",
      "new_id": "9813582a28c69a107076999b9cccee8d1e694958",
      "new_mode": 33188,
      "new_path": "src/gn/string_output_buffer.h"
    },
    {
      "type": "modify",
      "old_id": "e907dd0919cc9330e2697d2b2016f13e33f57c47",
      "old_mode": 33188,
      "old_path": "src/gn/string_output_buffer_unittest.cc",
      "new_id": "36101e59e3c31ce30215775eb59a6021e12eaba1",
      "new_mode": 33188,
      "new_path": "src/gn/string_output_buffer_unittest.cc"
    }
  ]
}
