)]}'
{
  "commit": "3da067ae399721e785e8389ae08f5d7627c7c220",
  "tree": "04d7f630866a3e9a171321b5a9c77913ab0728aa",
  "parents": [
    "7faf26cb851ed7adc5005a0e21f15672437a5493"
  ],
  "author": {
    "name": "Lalit Maganti",
    "email": "lalitm@google.com",
    "time": "Fri Apr 24 13:15:22 2026 +0000"
  },
  "committer": {
    "name": "Lalit Maganti",
    "email": "lalitm@google.com",
    "time": "Fri Apr 24 13:15:22 2026 +0000"
  },
  "message": "ui: Three flamegraph perf wins: skip empty walk, pre-floor trim, parentCum\n\nThree independent bit-identical optimizations that together shave ~20%\noff native bottom-up pipeline time (measured -16s on a 17M-walk-row\nheap-graph trace, 83s -\u003e 67s). All three are surgical: same output,\nno algorithmic change, just removing wasted work.\n\n1. Skip the empty UNION side in the hash walk. For BOTTOM_UP the\n   downwards walk has empty inits (showDownward\u003dFALSE) so it produces\n   no rows, but graph_scan still does setup work. For TOP_DOWN the\n   upwards walk is similarly empty (isPivot is never true). In the TS\n   layer, only call whichever macro actually produces rows.\n\n2. Pre-floor the trim propagation. The floor threshold (min_value) is\n   now applied at the scan edge filter instead of inside the\n   per-node IIF. Dest nodes below min_value are unreachable from the\n   seeded roots, which is exactly the \"dead\" semantic the original\n   implementation achieved via +inf propagation. On this trace the\n   scan input shrinks from 8.4M rows to ~108K rows; the propagation\n   step drops from 12.65s to 1.03s. Output bit-identical.\n\n3. Precompute parentCumulativeValue. resolve_groups already does\n   LEFT JOIN $grouped p to assign parentId; pulling p.cumulativeValue\n   through as a new column is free. trim_with_placeholder now carries\n   it forward (placeholders use MIN(d.parentCumulativeValue) since all\n   dropped children of a parent share it). global_layout reads it\n   directly from s instead of doing its own LEFT JOIN $merged p.\n   global_layout drops from 13.2s to 1.0s.\n\nAlso adds ORDER BY id to trim_with_placeholder. The merged UNION ALL\nwasn\u0027t emitting rows in dense id order, which the journal from the\nprior commit noted makes graph_scan 5x slower downstream in\nglobal_layout. Fixing it recovers global_layout\u0027s speedup from E.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8018b9e552643fc4f0e9cd3d3d0b5d87007305f0",
      "old_mode": 33188,
      "old_path": "src/trace_processor/perfetto_sql/stdlib/viz/flamegraph.sql",
      "new_id": "4207a048b848fc9e8fb385061dbe2ca6ab1eee49",
      "new_mode": 33188,
      "new_path": "src/trace_processor/perfetto_sql/stdlib/viz/flamegraph.sql"
    },
    {
      "type": "modify",
      "old_id": "10140d9e6dc39c7bbbee62927159c232eba9e1a7",
      "old_mode": 33188,
      "old_path": "ui/src/components/query_flamegraph.ts",
      "new_id": "09ec133c8d3d52e8f0e94454bb11ddedca5ad232",
      "new_mode": 33188,
      "new_path": "ui/src/components/query_flamegraph.ts"
    }
  ]
}
