Repository navigation
test: add viewport KeepAlive pan/zoom benchmark - #15372
claude[bot] wants to merge 29 commits into
Conversation
📦 Bundle Size
⚡ Performance Report
Scenario timings
Absolute values
Raw data{
"timestamp": "2026-10-27T07:35:27.081Z",
"gitSha": "99bd7061c5dbe27a63a4ff82b81e894ffede680e",
"branch": "test/viewport-culling-perf-benchmark",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2020.9580000000074,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.8140000000000005,
"layouts": 8,
"layoutDurationMs": 2.825,
"taskDurationMs": 555.6809999999999,
"heapDeltaBytes": 2246732,
"heapUsedBytes": 63732680,
"domNodes": 0,
"jsHeapTotalBytes": 7340032,
"scriptDurationMs": 10.774,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66611570247934,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-idle",
"durationMs": 2018.8460000000532,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.692,
"layouts": 8,
"layoutDurationMs": 2.756,
"taskDurationMs": 627.263,
"heapDeltaBytes": 3717892,
"heapUsedBytes": 64897008,
"domNodes": 0,
"jsHeapTotalBytes": 8388608,
"scriptDurationMs": 14.485000000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666942148760334,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1775.4059999999754,
"styleRecalcs": 76,
"styleRecalcDurationMs": 13.793,
"layouts": 10,
"layoutDurationMs": 2.891,
"taskDurationMs": 907.229,
"heapDeltaBytes": -1422540,
"heapUsedBytes": 68707516,
"domNodes": 0,
"jsHeapTotalBytes": 11272192,
"scriptDurationMs": 161.452,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66603773584906,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1841.468999999961,
"styleRecalcs": 76,
"styleRecalcDurationMs": 14.145999999999999,
"layouts": 9,
"layoutDurationMs": 2.801,
"taskDurationMs": 955.0829999999999,
"heapDeltaBytes": 23829168,
"heapUsedBytes": 84810276,
"domNodes": 0,
"jsHeapTotalBytes": 9699328,
"scriptDurationMs": 171.017,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665454545454544,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1707.5619999999958,
"styleRecalcs": 19,
"styleRecalcDurationMs": 5.9239999999999995,
"layouts": 10,
"layoutDurationMs": 3.527,
"taskDurationMs": 474.29200000000003,
"heapDeltaBytes": 24339004,
"heapUsedBytes": 84865836,
"domNodes": 56,
"jsHeapTotalBytes": 7077888,
"scriptDurationMs": 15.953000000000001,
"eventListeners": 43,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.6656862745098,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1724.8970000000554,
"styleRecalcs": 18,
"styleRecalcDurationMs": 5.316000000000001,
"layouts": 10,
"layoutDurationMs": 3.3620000000000005,
"taskDurationMs": 463.71999999999997,
"heapDeltaBytes": 970532,
"heapUsedBytes": 71624216,
"domNodes": 56,
"jsHeapTotalBytes": 9699328,
"scriptDurationMs": 14.052999999999999,
"eventListeners": 43,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666346153846153,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 743.1359999999927,
"styleRecalcs": 13,
"styleRecalcDurationMs": 2.9509999999999996,
"layouts": 9,
"layoutDurationMs": 2.6529999999999996,
"taskDurationMs": 517.285,
"heapDeltaBytes": 6801636,
"heapUsedBytes": 77169156,
"domNodes": 0,
"jsHeapTotalBytes": 9699328,
"scriptDurationMs": 172.696,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665909090909086,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 744.6529999999711,
"styleRecalcs": 13,
"styleRecalcDurationMs": 3.2930000000000006,
"layouts": 9,
"layoutDurationMs": 2.8130000000000006,
"taskDurationMs": 521.412,
"heapDeltaBytes": 6617100,
"heapUsedBytes": 77331308,
"domNodes": 0,
"jsHeapTotalBytes": 10485760,
"scriptDurationMs": 170.73,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1263.2849999999962,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 997.1830000000001,
"heapDeltaBytes": -11590876,
"heapUsedBytes": 75638648,
"domNodes": -191,
"jsHeapTotalBytes": 20979712,
"scriptDurationMs": 82.52,
"eventListeners": -106,
"totalBlockingTimeMs": 583,
"frameDurationMs": 34.229729729729726,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1375.3779999999551,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1126.3770000000002,
"heapDeltaBytes": -12573308,
"heapUsedBytes": 75214988,
"domNodes": -191,
"jsHeapTotalBytes": 21766144,
"scriptDurationMs": 87.415,
"eventListeners": -106,
"totalBlockingTimeMs": 669,
"frameDurationMs": 35.96315789473685,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 937.8700000000038,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 597.7310000000004,
"heapDeltaBytes": -28965212,
"heapUsedBytes": 67171944,
"domNodes": -191,
"jsHeapTotalBytes": 3670016,
"scriptDurationMs": 172.539,
"eventListeners": -106,
"totalBlockingTimeMs": 245,
"frameDurationMs": 25.224324324324304,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 919.7689999999739,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 598.8789999999997,
"heapDeltaBytes": -16179444,
"heapUsedBytes": 67182676,
"domNodes": -191,
"jsHeapTotalBytes": 1703936,
"scriptDurationMs": 180.443,
"eventListeners": -106,
"totalBlockingTimeMs": 233,
"frameDurationMs": 24.77297297297296,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "extension-clean-combined-draw",
"durationMs": 11659.20299999999,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10897.842,
"heapDeltaBytes": 79297716,
"heapUsedBytes": 155032628,
"domNodes": -257,
"jsHeapTotalBytes": 74838016,
"scriptDurationMs": 8780.541,
"eventListeners": -68,
"totalBlockingTimeMs": 1722,
"frameDurationMs": 32.4966573816156,
"p95FrameDurationMs": 66.69999999999982
},
{
"name": "extension-clean-combined-draw",
"durationMs": 11100.099,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10284.78,
"heapDeltaBytes": 71807948,
"heapUsedBytes": 146633828,
"domNodes": -257,
"jsHeapTotalBytes": 67760128,
"scriptDurationMs": 8276.105,
"eventListeners": -68,
"totalBlockingTimeMs": 1334,
"frameDurationMs": 31.443342776203966,
"p95FrameDurationMs": 66.60000000000036
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 11068.045000000013,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10281.072999999999,
"heapDeltaBytes": 79929588,
"heapUsedBytes": 162800392,
"domNodes": -257,
"jsHeapTotalBytes": 74838016,
"scriptDurationMs": 8304.883,
"eventListeners": -68,
"totalBlockingTimeMs": 1120,
"frameDurationMs": 31.52792022792023,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 11258.604999999989,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10491.958,
"heapDeltaBytes": 84072668,
"heapUsedBytes": 158403336,
"domNodes": -257,
"jsHeapTotalBytes": 79818752,
"scriptDurationMs": 8497.062,
"eventListeners": -68,
"totalBlockingTimeMs": 1319,
"frameDurationMs": 32.14142857142857,
"p95FrameDurationMs": 66.60000000000036
},
{
"name": "keep-alive-off",
"durationMs": 26419.196,
"styleRecalcs": 152,
"styleRecalcDurationMs": 18.119999999999997,
"layouts": 10,
"layoutDurationMs": 1.1940000000000006,
"taskDurationMs": 25657.82,
"heapDeltaBytes": -21009484,
"heapUsedBytes": 255395988,
"domNodes": 0,
"jsHeapTotalBytes": -13369344,
"scriptDurationMs": 829.612,
"eventListeners": 2,
"totalBlockingTimeMs": 17,
"frameDurationMs": 48.64751381215469,
"p95FrameDurationMs": 100.09999999999854
},
{
"name": "keep-alive-off",
"durationMs": 26397.72800000003,
"styleRecalcs": 152,
"styleRecalcDurationMs": 16.872999999999998,
"layouts": 10,
"layoutDurationMs": 1.1750000000000094,
"taskDurationMs": 25605.237,
"heapDeltaBytes": 1586416,
"heapUsedBytes": 256673640,
"domNodes": 0,
"jsHeapTotalBytes": -12320768,
"scriptDurationMs": 831.0600000000001,
"eventListeners": 2,
"totalBlockingTimeMs": 17,
"frameDurationMs": 49.22070895522387,
"p95FrameDurationMs": 100.10000000000582
},
{
"name": "keep-alive-on",
"durationMs": 6451.35700000003,
"styleRecalcs": 73,
"styleRecalcDurationMs": 71.478,
"layouts": 30,
"layoutDurationMs": 21.661,
"taskDurationMs": 5177.74,
"heapDeltaBytes": -3356792,
"heapUsedBytes": 113728060,
"domNodes": 276,
"jsHeapTotalBytes": 4456448,
"scriptDurationMs": 715.6519999999999,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.75272727272727,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "keep-alive-on",
"durationMs": 6573.2490000000325,
"styleRecalcs": 77,
"styleRecalcDurationMs": 74.27799999999998,
"layouts": 33,
"layoutDurationMs": 22.839000000000006,
"taskDurationMs": 5254.657,
"heapDeltaBytes": 4685496,
"heapUsedBytes": 117480516,
"domNodes": 284,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 739.152,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.880205655526993,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-combo-open",
"durationMs": 277.7369999999735,
"styleRecalcs": 24,
"styleRecalcDurationMs": 14.711,
"layouts": 11,
"layoutDurationMs": 3.3400000000000003,
"taskDurationMs": 235.18200000000002,
"heapDeltaBytes": -16449328,
"heapUsedBytes": 58240876,
"domNodes": 936,
"jsHeapTotalBytes": 1835008,
"scriptDurationMs": 8.827,
"eventListeners": 205,
"totalBlockingTimeMs": 3,
"frameDurationMs": 25,
"p95FrameDurationMs": 100.09999999999991
},
{
"name": "large-combo-open",
"durationMs": 233.89099999997143,
"styleRecalcs": 21,
"styleRecalcDurationMs": 13.274000000000001,
"layouts": 8,
"layoutDurationMs": 2.4450000000000003,
"taskDurationMs": 169.65000000000003,
"heapDeltaBytes": 14632612,
"heapUsedBytes": 73342448,
"domNodes": 936,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 9.915000000000001,
"eventListeners": 205,
"totalBlockingTimeMs": 5,
"frameDurationMs": 23.34000000000001,
"p95FrameDurationMs": 83.29999999999973
},
{
"name": "large-graph-idle",
"durationMs": 2057.1489999999812,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.503,
"layouts": 7,
"layoutDurationMs": 2.2429999999999994,
"taskDurationMs": 732.4969999999998,
"heapDeltaBytes": -3826884,
"heapUsedBytes": 72052728,
"domNodes": -257,
"jsHeapTotalBytes": 3534848,
"scriptDurationMs": 36.389,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665853658536584,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2057.1730000000343,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.7419999999999995,
"layouts": 8,
"layoutDurationMs": 2.978,
"taskDurationMs": 786.218,
"heapDeltaBytes": -30068448,
"heapUsedBytes": 61636844,
"domNodes": -257,
"jsHeapTotalBytes": 5144576,
"scriptDurationMs": 38.88,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665853658536584,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2744.3099999999845,
"styleRecalcs": 68,
"styleRecalcDurationMs": 9.284,
"layouts": 7,
"layoutDurationMs": 2.1020000000000003,
"taskDurationMs": 1826.5330000000001,
"heapDeltaBytes": -30310792,
"heapUsedBytes": 62201272,
"domNodes": -257,
"jsHeapTotalBytes": 6979584,
"scriptDurationMs": 879.965,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.768098159509208,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2640.6709999999975,
"styleRecalcs": 69,
"styleRecalcDurationMs": 8.916,
"layouts": 7,
"layoutDurationMs": 2.0340000000000003,
"taskDurationMs": 1773.822,
"heapDeltaBytes": 5756104,
"heapUsedBytes": 85727824,
"domNodes": -257,
"jsHeapTotalBytes": 4546560,
"scriptDurationMs": 849.7549999999999,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666037735849056,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3837.503999999967,
"styleRecalcs": 70,
"styleRecalcDurationMs": 9.775,
"layouts": 64,
"layoutDurationMs": 11.046,
"taskDurationMs": 1846.059,
"heapDeltaBytes": 8318136,
"heapUsedBytes": 85548848,
"domNodes": 24,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 806.274,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666086956521738,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3877.8780000000097,
"styleRecalcs": 71,
"styleRecalcDurationMs": 10.219999999999999,
"layouts": 64,
"layoutDurationMs": 11.035,
"taskDurationMs": 1842.598,
"heapDeltaBytes": 1008268,
"heapUsedBytes": 82283636,
"domNodes": -233,
"jsHeapTotalBytes": 4321280,
"scriptDurationMs": 805.2940000000001,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666523605150214,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3323.5689999999636,
"styleRecalcs": 45,
"styleRecalcDurationMs": 5.688,
"layouts": 5,
"layoutDurationMs": 1.529,
"taskDurationMs": 2195.004,
"heapDeltaBytes": 10284568,
"heapUsedBytes": 83471460,
"domNodes": -257,
"jsHeapTotalBytes": 3952640,
"scriptDurationMs": 1074.376,
"eventListeners": -62,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.83502538071066,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3244.8499999999285,
"styleRecalcs": 44,
"styleRecalcDurationMs": 5.729000000000001,
"layouts": 5,
"layoutDurationMs": 1.4309999999999996,
"taskDurationMs": 2090.7819999999997,
"heapDeltaBytes": 6415240,
"heapUsedBytes": 78691720,
"domNodes": -257,
"jsHeapTotalBytes": 3428352,
"scriptDurationMs": 1013.372,
"eventListeners": -65,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.840104166666666,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-geometry-cadence",
"durationMs": 3142.0519999999783,
"styleRecalcs": 8,
"styleRecalcDurationMs": 1.8710000000000002,
"layouts": 7,
"layoutDurationMs": 1.554,
"taskDurationMs": 856.364,
"heapDeltaBytes": -8594600,
"heapUsedBytes": 70711888,
"domNodes": -257,
"jsHeapTotalBytes": 3534848,
"scriptDurationMs": 375.853,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665957446808513,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-geometry-cadence",
"durationMs": 3115.8849999999347,
"styleRecalcs": 7,
"styleRecalcDurationMs": 1.9929999999999999,
"layouts": 6,
"layoutDurationMs": 1.7560000000000002,
"taskDurationMs": 853.302,
"heapDeltaBytes": -277528,
"heapUsedBytes": 78284916,
"domNodes": -257,
"jsHeapTotalBytes": 4583424,
"scriptDurationMs": 377.17900000000003,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665775401069517,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 2055.3840000000037,
"styleRecalcs": 7,
"styleRecalcDurationMs": 1.8580000000000003,
"layouts": 6,
"layoutDurationMs": 1.8090000000000004,
"taskDurationMs": 688.701,
"heapDeltaBytes": -8674360,
"heapUsedBytes": 62901948,
"domNodes": -257,
"jsHeapTotalBytes": 2748416,
"scriptDurationMs": 33.005,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665040650406503,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2046.8880000000809,
"styleRecalcs": 7,
"styleRecalcDurationMs": 2.3280000000000003,
"layouts": 7,
"layoutDurationMs": 2.2300000000000004,
"taskDurationMs": 694.073,
"heapDeltaBytes": -19693464,
"heapUsedBytes": 73343176,
"domNodes": -257,
"jsHeapTotalBytes": 5144576,
"scriptDurationMs": 35.684,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66585365853659,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-progress-execution-cadence",
"durationMs": 2868.418999999989,
"styleRecalcs": 26,
"styleRecalcDurationMs": 11.629,
"layouts": 6,
"layoutDurationMs": 1.6610000000000003,
"taskDurationMs": 638.579,
"heapDeltaBytes": -267576,
"heapUsedBytes": 75946552,
"domNodes": -253,
"jsHeapTotalBytes": 4059136,
"scriptDurationMs": 203.088,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665697674418606,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-progress-execution-cadence",
"durationMs": 2770.854999999983,
"styleRecalcs": 26,
"styleRecalcDurationMs": 12.269000000000002,
"layouts": 7,
"layoutDurationMs": 2.04,
"taskDurationMs": 647.179,
"heapDeltaBytes": -1641512,
"heapUsedBytes": 75854312,
"domNodes": -253,
"jsHeapTotalBytes": 3010560,
"scriptDurationMs": 196.108,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66566265060241,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-topology-cadence",
"durationMs": 3353.2699999999804,
"styleRecalcs": 6,
"styleRecalcDurationMs": 2.0230000000000006,
"layouts": 6,
"layoutDurationMs": 1.425,
"taskDurationMs": 996.313,
"heapDeltaBytes": 3871744,
"heapUsedBytes": 80747276,
"domNodes": -257,
"jsHeapTotalBytes": 5894144,
"scriptDurationMs": 393.54100000000005,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.7495,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-topology-cadence",
"durationMs": 3352.049000000079,
"styleRecalcs": 6,
"styleRecalcDurationMs": 1.7660000000000002,
"layouts": 6,
"layoutDurationMs": 2.1719999999999997,
"taskDurationMs": 1029.691,
"heapDeltaBytes": -8493340,
"heapUsedBytes": 62849600,
"domNodes": -257,
"jsHeapTotalBytes": 3010560,
"scriptDurationMs": 389.18199999999996,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666169154228854,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 689.3950000000473,
"styleRecalcs": 46,
"styleRecalcDurationMs": 5.405,
"layouts": 9,
"layoutDurationMs": 3.009,
"taskDurationMs": 462.47400000000005,
"heapDeltaBytes": -862184,
"heapUsedBytes": 60995792,
"domNodes": 0,
"jsHeapTotalBytes": 8126464,
"scriptDurationMs": 148.49699999999999,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66585365853659,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 648.3279999999922,
"styleRecalcs": 46,
"styleRecalcDurationMs": 4.971999999999999,
"layouts": 8,
"layoutDurationMs": 2.3029999999999995,
"taskDurationMs": 453.38800000000003,
"heapDeltaBytes": -55848,
"heapUsedBytes": 62104036,
"domNodes": 0,
"jsHeapTotalBytes": 8912896,
"scriptDurationMs": 144.347,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665789473684214,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-idle",
"durationMs": 2008.0259999999726,
"styleRecalcs": 10,
"styleRecalcDurationMs": 3.040000000000001,
"layouts": 10,
"layoutDurationMs": 3.0170000000000003,
"taskDurationMs": 584.251,
"heapDeltaBytes": 5635184,
"heapUsedBytes": 77399132,
"domNodes": 0,
"jsHeapTotalBytes": 10223616,
"scriptDurationMs": 10.639000000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-idle",
"durationMs": 2023.1029999999919,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.6399999999999992,
"layouts": 8,
"layoutDurationMs": 2.667,
"taskDurationMs": 637.5649999999999,
"heapDeltaBytes": 1756468,
"heapUsedBytes": 64405868,
"domNodes": 0,
"jsHeapTotalBytes": 7340032,
"scriptDurationMs": 12.701,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1708.4459999999808,
"styleRecalcs": 77,
"styleRecalcDurationMs": 14.406000000000002,
"layouts": 9,
"layoutDurationMs": 2.743,
"taskDurationMs": 861.013,
"heapDeltaBytes": 17558960,
"heapUsedBytes": 78752076,
"domNodes": 0,
"jsHeapTotalBytes": 7340032,
"scriptDurationMs": 112.156,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.6656862745098,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1723.2420000000275,
"styleRecalcs": 79,
"styleRecalcDurationMs": 14.88,
"layouts": 9,
"layoutDurationMs": 2.6370000000000005,
"taskDurationMs": 896.79,
"heapDeltaBytes": -5702128,
"heapUsedBytes": 66713596,
"domNodes": 0,
"jsHeapTotalBytes": 10747904,
"scriptDurationMs": 113.542,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666019417475724,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 1470.7750000000033,
"styleRecalcs": 19,
"styleRecalcDurationMs": 22.997999999999998,
"layouts": 5,
"layoutDurationMs": 14.505999999999998,
"taskDurationMs": 1168.0259999999998,
"heapDeltaBytes": 12209424,
"heapUsedBytes": 90759296,
"domNodes": 16110,
"jsHeapTotalBytes": 7999488,
"scriptDurationMs": 35.448,
"eventListeners": 3246,
"totalBlockingTimeMs": 166,
"frameDurationMs": 19.777333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 10656.502999999986,
"styleRecalcs": 251,
"styleRecalcDurationMs": 30.659999999999997,
"layouts": 9,
"layoutDurationMs": 2.4499999999999997,
"taskDurationMs": 6420.201000000001,
"heapDeltaBytes": 5870364,
"heapUsedBytes": 84879632,
"domNodes": -257,
"jsHeapTotalBytes": 5038080,
"scriptDurationMs": 2853.321,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666040688575897,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 9595.988999999918,
"styleRecalcs": 250,
"styleRecalcDurationMs": 28.296,
"layouts": 8,
"layoutDurationMs": 1.9279999999999997,
"taskDurationMs": 6009.706,
"heapDeltaBytes": -15805712,
"heapUsedBytes": 61374092,
"domNodes": -257,
"jsHeapTotalBytes": 4321280,
"scriptDurationMs": 2717.208,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.69495652173913,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 6095.37499999999,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4615.159,
"heapDeltaBytes": -15791144,
"heapUsedBytes": 105803272,
"domNodes": 0,
"jsHeapTotalBytes": 3932160,
"scriptDurationMs": 105.95,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666120218579234,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 6114.690999999993,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4992.928,
"heapDeltaBytes": 11994620,
"heapUsedBytes": 120275916,
"domNodes": 0,
"jsHeapTotalBytes": 4456448,
"scriptDurationMs": 116.55799999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665940054495913,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 7224.590999999975,
"styleRecalcs": 62,
"styleRecalcDurationMs": 10.690999999999999,
"layouts": 1,
"layoutDurationMs": 0.17399999999999707,
"taskDurationMs": 5973.741999999999,
"heapDeltaBytes": 2170440,
"heapUsedBytes": 106852244,
"domNodes": 3,
"jsHeapTotalBytes": 2359296,
"scriptDurationMs": 744.4079999999999,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.704618937644344,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 7266.186999999945,
"styleRecalcs": 62,
"styleRecalcDurationMs": 11.233999999999995,
"layouts": 1,
"layoutDurationMs": 0.16399999999999748,
"taskDurationMs": 6005.471,
"heapDeltaBytes": 24027064,
"heapUsedBytes": 129336540,
"domNodes": 3,
"jsHeapTotalBytes": 2846720,
"scriptDurationMs": 763.4430000000001,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.742857142857144,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-zoom-out-idle",
"durationMs": 5196.354999999983,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4624.3060000000005,
"heapDeltaBytes": 10312156,
"heapUsedBytes": 157648924,
"domNodes": -141,
"jsHeapTotalBytes": 14938112,
"scriptDurationMs": 106.294,
"eventListeners": -4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.104276315789477,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-zoom-out-idle",
"durationMs": 5379.421999999977,
"styleRecalcs": 1,
"styleRecalcDurationMs": 0.07799999999999474,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4807.629999999999,
"heapDeltaBytes": 1472764,
"heapUsedBytes": 149283196,
"domNodes": -141,
"jsHeapTotalBytes": 22540288,
"scriptDurationMs": 119.78200000000005,
"eventListeners": -4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.714238410596028,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "workflow-execution",
"durationMs": 511.50100000000975,
"styleRecalcs": 18,
"styleRecalcDurationMs": 17.97,
"layouts": 12,
"layoutDurationMs": 4.937,
"taskDurationMs": 155.215,
"heapDeltaBytes": 7153132,
"heapUsedBytes": 74736764,
"domNodes": 138,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 14.598,
"eventListeners": 7,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "workflow-execution",
"durationMs": 502.7670000000626,
"styleRecalcs": 20,
"styleRecalcDurationMs": 11.606000000000002,
"layouts": 11,
"layoutDurationMs": 5.3950000000000005,
"taskDurationMs": 138.395,
"heapDeltaBytes": 6957664,
"heapUsedBytes": 67930308,
"domNodes": 129,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 12.689999999999998,
"eventListeners": 7,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 532.0520000000215,
"styleRecalcs": 5,
"styleRecalcDurationMs": 0.6809999999999999,
"layouts": 76,
"layoutDurationMs": 16.558,
"taskDurationMs": 485.389,
"heapDeltaBytes": -3754508,
"heapUsedBytes": 37991468,
"domNodes": 4,
"jsHeapTotalBytes": 1048576,
"scriptDurationMs": 231.92399999999998,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.662499999999994,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 583.3979999999883,
"styleRecalcs": 5,
"styleRecalcDurationMs": 0.736,
"layouts": 76,
"layoutDurationMs": 17.042,
"taskDurationMs": 536.438,
"heapDeltaBytes": -3176204,
"heapUsedBytes": 42019704,
"domNodes": 4,
"jsHeapTotalBytes": 2621440,
"scriptDurationMs": 262.683,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66571428571429,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 687.6689999999144,
"styleRecalcs": 5,
"styleRecalcDurationMs": 2.248,
"layouts": 76,
"layoutDurationMs": 17.511,
"taskDurationMs": 643.43,
"heapDeltaBytes": 2949508,
"heapUsedBytes": 96483224,
"domNodes": 4,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 267.12,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.070731707317087,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 576.3309999999819,
"styleRecalcs": 5,
"styleRecalcDurationMs": 2.684,
"layouts": 76,
"layoutDurationMs": 15.961,
"taskDurationMs": 542.062,
"heapDeltaBytes": 1743416,
"heapUsedBytes": 95279724,
"domNodes": 4,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 215.092,
"eventListeners": 296,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66285714285714,
"p95FrameDurationMs": 16.800000000000182
}
]
}🔬 E2E CoverageLine coverage: 60.4% Coverage totals
Top 10 files by uncovered lines
🎭 Playwright: ✅ 3122 passed, 0 failed · 3 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measureExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight
Findings and check detailsThe matrix runs on same-repository version-bump PRs with relevant changes, main-branch pushes, and manual dispatches. This candidate does not qualify, so every expensive stage was skipped. Reproduce locally# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
npx vitest run --config vitest.matrix.config.mts
Full docs: scripts/registry-census/README.md 🌾 Fallow: ✅ PassedFallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened. Findings and check detailsNo new findings in the changed files. Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since 740211cd66a44120b9e0dca96df0577601a64448
Full docs: ADR-DEVEX-LINT-0015 🏛️ Architecture: ✅ PassedFindings and check detailsWarnings (210)
Reproduce locallypnpm architecture:checkFull docs: Frontend domain catalog |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## benjcooley/vue-nodes-simple-keepalive #15372 +/- ##
=========================================================================
- Coverage 87.63% 87.32% -0.31%
=========================================================================
Files 2787 2948 +161
Lines 155021 156865 +1844
Branches 41923 41923
=========================================================================
+ Hits 135848 136989 +1141
- Misses 18499 19201 +702
- Partials 674 675 +1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Review against the branch this replaces found six regressions. All are restored here; the seventh finding, unbounded activation at low zoom, is owned by the LOD layer stacked above and is deliberately not duplicated. Detached elements no longer measure into canonical layout. KeepAlive deactivation detaches the subtree without unmounting it, and the shared ResizeObserver kept watching. A detached element reports 0x0, which is not equal to any real size and so passed every isBoundsEqual guard, reaching layoutStore and from there node.serialize(). This was the hazard the previous branch chose v-if over display:none to avoid, and the guard was never carried across. The observer callback now skips disconnected targets and marks them for a fresh measurement on reattach. The regression test was committed and confirmed red in CI before this fix. Selection is no longer a pin. Retention re-adds a node only while it is pinned and already attached, but a retained node is attached on the next refresh too, so retention feeds itself: select-all then pan accumulated every node the viewport ever touched and silently disabled the feature. A test reproduces exactly that at 150 of 150. Under KeepAlive a detached node keeps both its component instance and its selection state, so selection needs no attachment guarantee, and it is the one pin that can be graph- sized. The remaining pins - focus, playing media, link-drag source - are bounded by construction, and each can only exist on an attached node, so retention is the correct direction and admission is never needed. The extension opt-out is restored with the same contract as before: extensionManager.vueNodes.registerCullingOptOut(nodeType), ref-counted, returning a release. Under KeepAlive it is admission rather than retention - a registered type stays attached wherever it is - because it exists for state a detach destroys and a component cannot keep: canvas contexts, uncontrolled editors, self-measuring widgets. Registration is reactive, so an extension registering at load attaches its nodes without waiting for a pan. A support kill switch is added as Comfy.VueNodes.ViewportKeepAlive. It is a new id: the previous setting had been redefined to choose between unmount and keep-alive, and there is no unmount mode here to choose. Passed as a getter so it is a reactive dependency - off attaches everything rather than freezing the last computed set, and on recomputes at once. The live-state subtree scan is throttled to the sibling composable's 100ms. It ran on every mutation batch under the root, and every activate and deactivate is such a batch, so it rescanned on exactly the churn it exists to bound. Membership is a length plus order-independent digest instead of a JSON string over every id, which allocated proportional to graph size on the path this feature exists to make cheap. Each fix is pinned by a test that fails against its mutant: dropping the detached guard, ignoring or un-watching the kill switch, not admitting or not reacting to opt-out registration, turning pins into admission, and breaking release idempotency in the registry.
|
@DrJKL — heads up before this goes further: the architecture underneath it was replaced on 2026-08-18, after this was opened. #15030 is retired (retitled Three concrete consequences for this branch:
So this cannot merge as-is, but the purpose is still worth having — arguably more now than before, because the ADR's performance evidence is a three-run smoke and, separately, CI perf baselines have not been written since March (#15409), so there is no automated corroboration for any of this. Suggested retarget, if you still want it:
Not asking anyone to drop work; flagging it now so this does not get rebased into a conflict or land a duplicate setting. Happy to review the retarget. |
…cture #15030 (viewport culling) was retired and replaced by #15405, which ships KeepAlive-only viewport retention (Comfy.VueNodes.ViewportKeepAlive, default on) with no destructive-unmount mode. Rebase this benchmark onto #15405's branch and drive it off that setting directly instead of the deleted useViewportCulling.ts and the now-nonexistent Comfy.VueNodes.ViewportCullingKeepAlive setting this PR had added. - Drop the Comfy.VueNodes.ViewportCullingKeepAlive setting and the GraphCanvas.vue KeepAlive branch that pointed at it - #15405's GraphCanvas already renders through KeepAlive unconditionally, gated by Comfy.VueNodes.ViewportKeepAlive. - Rewrite viewportCullingBenchmark.spec.ts as a two-way KeepAlive on/off comparison (no third "destroy" variant, since one no longer exists). - Drop the mount-admission/departure debounce-settle helpers; KeepAlive activation is one throttled refresh (REFRESH_THROTTLE_MS = 100ms in useViewportKeepAlive.ts), so settling is a single idleFrames wait.
f7c1f7f to
76704b1
Compare
|
Verified @christian-byrne's comment above independently before acting on it:
All checked out, so I retargeted this PR:
One thing I could not do: this session's GitHub write access explicitly excludes changing a PR's base branch, so the PR still shows Also worth flagging per your comment: the Chrome-specific KeepAlive perf gap and the dead perf-baseline pipeline (#15409) aren't addressed by this benchmark either way — this PR only measures relative on/off cost locally, with no CI baseline to compare against yet. Generated by Claude Code |
Base branch was changed to benjcooley/vue-nodes-simple-keepalive via the GitHub UI after this branch was already rebased onto it, which only fired a pull_request "edited" event. CI workflows (ci-tests-e2e.yaml, ci-tests-unit.yaml, ci-lint-format.yaml, etc.) trigger on default pull_request types [opened, synchronize, reopened] and do not listen for "edited", so no run was ever queued for this SHA. This empty commit fires a real "synchronize" event to get CI running.
christian-byrne
left a comment
There was a problem hiding this comment.
Reviewing the retarget since I prompted it. The rebase onto #15405 is correct and the verification you did before acting on my comment — checking that useViewportCulling.ts and Comfy.VueNodes.ViewportCulling still exist on #15030's branch, to confirm the deletion was specific to the replacement rather than upstream of both — is exactly the right check. Setting id, throttle constant and settle logic all match #15405 at 554cd8c2a8.
Two issues with the assertions, both the same root cause: the benchmark never actually compares.
Structurally this is instrumentation rather than a test — which is fine and probably intended, but the two expects read as though they guard the comparison, and they don't. Worth either strengthening them or dropping the pretence and saying in the file header that this emits numbers for a human to read. My preference is the former, because #15409 means there is no baseline pipeline to catch drift across runs either, so these assertions are the only automated signal this PR has.
Not blocking — it's a draft and the direction is right.
…d-count bound Address review from christian-byrne on PR #15372: - Merge the two separate keep-alive-on/keep-alive-off tests into a single test that runs both sequences back to back, so the on/off relationship can actually be asserted instead of each run only checking its own numbers. Assert both that attached-node counts differ materially and that retention's CDP task-duration comes in below the no-retention baseline, with slack for CI noise. - Replace the toBeLessThan(TOTAL_NODE_COUNT) attached-count check (passed even with only one node detached) with a viewport-derived TOTAL_NODE_COUNT * 0.8 bound that would actually fail if retention regressed to near-zero benefit.
52a8648 to
be4d7da
Compare
…rt-culling-perf-benchmark Resolves conflicts from the base branch's ongoing refactor: - browser_tests/tests/mobileBaseline.spec.ts-snapshots/mobile-settings-dialog-mobile-chrome-linux.png: took the base branch's updated screenshot baseline - src/renderer/extensions/vueNodes/composables/useVueNodeResizeTracking.test.ts: took the base branch's version, which is a superset already containing this PR's two added tests under the renamed syncSlotOffsets mock Also fixes two now-flagged unnecessary type assertions in browser_tests/tests/vueNodes/viewportKeepAlive.spec.ts surfaced by the base branch's newly added no-unnecessary-type-assertion oxlint rule.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
The "Vercel – comfy-home-v1" deployment check is failing on the latest commit ( Verified it's a pre-existing, repo-wide issue: the same check fails identically on several other recent, unrelated open PRs, including a pure version-bump PR (#16557) that touches only a version string. Two of those failures show a generic account/team-access-flavored error rather than a build log, suggesting a broken Vercel project config or permissions issue on This PR's diff doesn't touch I don't have the means to fix or re-run this check (no Vercel project access). Flagging for whoever owns Generated by Claude Code |
|
Updating Playwright Expectations |
| snapshot | status | changed pixels | | --- | --- | --- | | `tests/mobileBaseline.spec.ts-snapshots/mobile-settings-dialog-mobile-chrome-linux.png` | modified | 21190B -> 25499B | | `tests/vueNodes/nodeStates/mute.spec.ts-snapshots/vue-node-muted-state-chromium-linux.png` | modified | 103422B -> 104244B | Screenshot capture is not bit-deterministic; small pixel deltas are usually text rasterization noise. Confirm each rewrite corresponds to a test expected to change.
The automated screenshot-regen commit (8c296df) rewrote the baseline for vue-node-muted-state-chromium-linux.png, but that baseline was not actually stale — it passes on the base branch with its prior version. The regenerated image doesn't match CI's render grouping and now fails mute.spec.ts consistently across retries. Restoring the pre-regen baseline; the settings-dialog screenshot fix from the same commit is kept as-is.
| // count", which a single detached node would also satisfy. | ||
| expect(on.attachedNodeCount).toBeLessThan( | ||
| on.totalNodeCount * MAX_ATTACHED_RATIO_WITH_KEEP_ALIVE | ||
| ) |
There was a problem hiding this comment.
NON-BLOCKING (new this round, not a regression from my last pass) — both retention checks are one-sided, so a total retention failure passes green.
useViewportKeepAlive.ts:111 bails out without populating activeNodeIds when the viewport has not been measured yet:
if (viewport.width <= 0 || viewport.height <= 0) returnIn that state activeNodeIds is empty and zero nodes are attached — a blank canvas. Both guards in this variant are satisfied by zero:
- the settle gate at L100-102,
expect.poll(...).toBeLessThan(totalNodeCount)→0 < 245resolves on the first tick, so it stops being a settle gate at all and measurement can start against a partially-populated (or empty) set - this assertion,
toBeLessThan(245 * 0.8)→0 < 196passes
So the failure mode where retention detaches everything is scored as the best possible result. That is the same shape as @christian-byrne's original finding on this line (an assertion green in exactly the case it should catch), just at the other end of the range.
Cheap fix — bound it on both sides:
| ) | |
| expect(on.attachedNodeCount).toBeGreaterThan(0) | |
| expect(on.attachedNodeCount).toBeLessThan( | |
| on.totalNodeCount * MAX_ATTACHED_RATIO_WITH_KEEP_ALIVE | |
| ) |
and give the L100-102 poll a lower bound too, so it actually waits for a populated set.
Separately, now that CI gives real numbers — 48/245 = 19.6% attached, stable across both repeats — the 0.8 ceiling has ~4x of slack. Retention could regress to 70% attached, losing most of the benefit, and still pass. Something like 0.4 would still be far from node-density-coupled while catching an actual regression. Your call; I know the coarseness was deliberate in the earlier round, but that was decided without measurements in hand.
There was a problem hiding this comment.
Confirmed and fixed in fe5d7ee.
Verified the bug independently against useViewportKeepAlive.ts: when getViewportSize() returns width/height <= 0, refresh() returns at line 111 before touching activeNodeIds, so the set stays at its initial empty Set() — zero nodes attached. Both checks here were indeed one-sided upper bounds, so that zero-attached state would read as a pass on both.
Changes:
- The settle-gate poll (L100-102) now has a companion
expect.poll(() => comfyPage.vueNodes.nodes.count()).toBeGreaterThan(0)right after the existingtoBeLessThan(totalNodeCount)poll, so it actually waits for a populated set rather than just "not the full count." - Added
expect(on.attachedNodeCount).toBeGreaterThan(0)alongside the existing ratio assertion, so a total-retention failure fails loudly instead of passing as the best possible result. - Tightened
MAX_ATTACHED_RATIO_WITH_KEEP_ALIVEfrom0.8to0.4, per your point: real CI measured 48/245 (~19.6%) attached, stable across repeats, so0.4still clears that comfortably while cutting the slack roughly in half from where it was.
Generated by Claude Code
benjcooley
left a comment
There was a problem hiding this comment.
Re-review — round 3 (scoped to 78c60d4..80b4f0d9)
Approving. All 10 findings from my last pass are genuinely fixed, and the difference that matters this round is that there are finally real CI numbers behind the claims instead of estimates. perf-tests is green at 11m41s and prints:
| attached | DOM elements | task | wall clock | |
|---|---|---|---|---|
keep-alive-on |
48/245 | 4,512 | 4,470ms | 6,307ms |
keep-alive-off |
245/245 | 21,409 | 20,576ms | 22,262ms |
Stable across both --repeat-each runs. That is a 4.7x DOM reduction and a 4.6x task-duration reduction — this benchmark now demonstrably measures the thing it is named after, which was exactly what was in doubt last round.
Verification notes
- BLOCKER (observer double-count) — fixed by deletion rather than by patching.
installPerfObservers/readPerfObserversare gone; everything is sourced fromPerformanceHelper, which resets per measurement. The test split makes cross-variant bleed structurally impossible on top of that. - Mount gate — the
offvariant polls to the full count before measuring. Credit where due:78c60d4over-fixed this by gating both variants onwaitForNodes(totalNodeCount), which cannot resolve when retention is on; real CI hung on it andcde5dcf1corrected it. Catching that in CI rather than declaring it fixed is the behaviour I want to see. - Sweep amplitude — 48/245 attached is the proof that
dx: 48, dy: 18actually crosses viewport boundaries. Previously there was no evidence either way. - Timeouts — 90s/120s against measured 6.3s/22.3s. ~5x headroom, tight variance, whole perf job at 11m41s against a 30min budget. Correctly sized.
- I also verified independently that the benchmark's load-bearing assumptions hold against the implementation: KeepAlive deactivation genuinely detaches (Vue moves the subtree to an off-document container, so the
[data-node-id]locator stops seeing it), and nothing else in the codebase can detach nodes when the setting is off —vueNodeCullingServiceis an opt-out registry that can only force nodes to stay attached, and there is no separateViewportCullingsetting. Theoffvariant's exact-equality assert is sound.
Two things before merge
- CI is red on
Check for AI agent co-author trailers, and it is correct to be.78c60d4306andcde5dcf125carryCo-Authored-By: Claude Sonnet 5andClaude-Session:trailers, which AGENTS.md prohibits ("Never mention Claude/AI in commits"). Needs a history rewrite or a clean squash message. Not a code objection — but it is a red check, so flagging it as the actual merge blocker. - One new non-blocking finding, left inline: both retention checks on the
onvariant are one-sided, so the degenerate case where retention detaches everything (viewport not yet measured →activeNodeIdsempty) passes green and is scored as the best possible result. AtoBeGreaterThan(0)on both the settle poll and the final assert closes it. Same shape as @christian-byrne's original finding, at the other end of the range.
Also noted inline, informational: recordMeasurement only persists the PerfMeasurement shape, so the field that reaches the perf-report JSON is domNodes — the delta, which measured Δ-1354 vs Δ-1487 and does not discriminate between variants. The 4,512-vs-21,409 number that carries the whole signal is console.log-only. Fine for a benchmark that explicitly is not a regression gate; worth knowing if it is ever wired into the baseline.
Neither of these needs another review round from me — fix the trailers, take or leave the bounds suggestion.
The keep-alive-on settle-gate poll and its attached-ratio assertion only enforced an upper bound (attached < total / attached < ratio * total). A total-retention failure in useViewportKeepAlive (e.g. bailing out with zero active nodes before the viewport is measured) would satisfy both checks, masking the regression. - Add a lower-bound poll requiring a non-empty attached set before measurement starts. - Add a lower-bound assertion (attachedNodeCount > 0) alongside the existing ratio assertion. - Tighten MAX_ATTACHED_RATIO_WITH_KEEP_ALIVE from 0.8 to 0.4: CI runs on this PR measured 48/245 (~19.6%) attached with keep-alive on, stable across repeats, so 0.4 still comfortably clears the real ratio while catching a real regression much sooner than 0.8 would.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
fe5d7ee to
1bc2562
Compare
…g-perf-benchmark Resolve conflicts by taking the base branch's versions of the files the PR does not own, and drop the benchmark's afterEach resetView call, which the base removed from CanvasHelper.
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @christian-byrne.
Found 8 finding(s).
| Severity | Count |
|---|---|
| 🟡 Medium | 2 |
| 🟢 Low | 3 |
| ⚪ Nit | 3 |
Panel: 6/6 reviewers contributed findings.
|
|
||
| // Let the trailing edge of the throttled refresh (and any pending | ||
| // attach/detach) settle before reading final numbers. | ||
| await comfyPage.idleFrames(KEEP_ALIVE_SETTLE_FRAMES) |
There was a problem hiding this comment.
🟡 Medium — idleFrames(10) is a frame count, but the throttle it waits for (REFRESH_THROTTLE_MS = 100) is measured in time. At anything faster than 100Hz, ten frames finish before 100ms (about 83ms at 120Hz), so the trailing refresh can fire after stopMeasuring(). The attachedNodeCount asserted at line 191 is also read only once, so a late refresh makes that 40% check flaky. Wait for elapsed time, or expect.poll the attached count until it is stable, rather than guessing a number of frames.
Raised by 3 of 6 reviewers (claude-opus-5-5-xhigh adversarial, claude-opus-5-5-xhigh edge-case, gpt-5.6-sol-xhigh edge-case).
There was a problem hiding this comment.
Verified: ten frames is a count and REFRESH_THROTTLE_MS is time, so a high-refresh runner could finish the wait before the trailing refresh fires. Fixed in 30224d1. idleFrames(10) is replaced by waitForAttachedNodeCountToStabilize(), which polls (15s bound) until the attached count is unchanged across a 200ms rAF-timed idle window, and attachedNodeCount is read after that. Not yet run in CI.
Generated by Claude Code
| // force real attach/detach churn. | ||
| await comfyPage.canvasOps.panSweep({ steps: 20, dx: 48, dy: 18 }) | ||
| for (let z = 0; z < 5; z++) { | ||
| await comfyPage.canvasOps.zoom(-100) |
There was a problem hiding this comment.
🟡 Medium — canvasOps.zoom() dispatches its wheel events at pointer position (10, 10). In this spec that point sits under the pointer-active Topbar workflow-tabs overlay, so the zoom steps may never reach the canvas. performance.spec.ts already documents this problem with the helper. If so, both variants measure a pan-only workload while it is labeled pan+zoom. Move the pointer onto the canvas before zooming, or use the workaround from performance.spec.ts, and check that the canvas scale actually changes.
Raised by 1 of 6 reviewers (gpt-5.6-sol-xhigh edge-case).
There was a problem hiding this comment.
Verified: canvasOps.zoom() moves the pointer to (10, 10), and performance.spec.ts ("zoom out idle") documents that this point sits over an overlay and left the scale unchanged. Fixed in 30224d1: after panSweep the pointer moves to the canvas centre and the wheel events go through page.mouse.wheel, and the sequence now polls canvasOps.getScale() to confirm the zoom-in phase raised the scale. Not yet run in CI.
Generated by Claude Code
| // units, and the default 8/3 amplitude only traverses a few hundred | ||
| // units round trip — far too small to cross viewport boundaries and | ||
| // force real attach/detach churn. | ||
| await comfyPage.canvasOps.panSweep({ steps: 20, dx: 48, dy: 18 }) |
There was a problem hiding this comment.
🟢 Low — Sweep distance is steps * dx, not dx alone. panSweep({ steps: 20, dx: 48, dy: 18 }) peaks at about 19×48 = 912px, slightly less than the default panSweep() (about 119×8 = 952px). So the "6x the defaults" reasoning here and at lines 22-25 is wrong, and the sweep does not create the extra attach/detach churn it claims. Increase steps or the per-step delta so the sweep really crosses viewport boundaries, and correct the comments.
Raised by 2 of 6 reviewers (claude-opus-5-5-xhigh adversarial, claude-opus-5-5-xhigh edge-case).
There was a problem hiding this comment.
Partly verified. The arithmetic is right: reach is (steps-1)*dx, so 19*48 = 912px against about 952px for the defaults, and the "6x the defaults" comment was wrong. I removed those comments in 30224d1 but did not change steps/dx/dy. Modelling the asset (245 nodes, scale 0.5, 1280x720, keep-alive margin 50%) gives 48 attached at the start, which matches the CI figure of 48/245. At the sweep peak it gives 22 attached, so about 26 of those 48 detach and re-attach on the way back. That is real churn, so I left the sweep alone rather than retune it blind.
Generated by Claude Code
| // gate: it only resolves once retention has caught up. | ||
| await expect | ||
| .poll(() => comfyPage.vueNodes.nodes.count()) | ||
| .toBeLessThan(totalNodeCount) |
There was a problem hiding this comment.
🟢 Low — The comment calls this poll a settle gate that resolves only once retention has caught up. In fact toBeLessThan(totalNodeCount) passes on the first read where a single node has detached. Nodes without layout bounds start attached and are detached later by the throttled refresh, so that detach and KeepAlive deactivation work can still land inside the "on" measurement window. Poll until the attached count stops changing before calling startMeasuring().
Raised by 2 of 6 reviewers (claude-opus-5-5-xhigh adversarial, claude-opus-5-5-xhigh edge-case).
There was a problem hiding this comment.
Verified: toBeLessThan(totalNodeCount) passes on the first read below the total, and nodes without bounds yet can still detach on later throttled refreshes. Fixed in 30224d1. The same stabilize poll now runs for both variants before startMeasuring(), after the existing checks, which are kept because they resolve with retention on. It is bounded (15s) and always resolves once the graph is idle, so it avoids the earlier hang. Not yet run in CI.
Generated by Claude Code
| comfyPage.page.evaluate(() => document.getElementsByTagName('*').length) | ||
| ]) | ||
|
|
||
| recordMeasurement(cdpMetrics) |
There was a problem hiding this comment.
🟢 Low — recordMeasurement(cdpMetrics) saves the sample inside benchmarkViewportKeepAlive, before the caller checks the attached-node invariants. A run that fails an invariant, including a retried attempt, has therefore already written its sample to perf-temp, where it can be aggregated into the results or the baseline. Return the metrics and record them only after the invariants pass.
Raised by 1 of 6 reviewers (gpt-5.6-sol-xhigh edge-case).
There was a problem hiding this comment.
Verified: recordMeasurement() ran before the caller's invariant checks. Fixed in 30224d1: the benchmark returns the measurement, and each test calls recordMeasurement() only after its attached-node assertions pass, so failed or retried attempts no longer write samples.
Generated by Claude Code
| ): Promise<number> { | ||
| return comfyPage.page.evaluate((name) => { | ||
| const entry = performance.getEntriesByName(name, 'measure').at(0) | ||
| return entry?.duration ?? 0 |
There was a problem hiding this comment.
⚪ Nit — If the measure entry is missing (marks cleared, or the names drift), entry?.duration ?? 0 makes the benchmark log a plausible-looking "0ms wall clock" instead of failing. Throw or assert when entry is undefined.
Raised by 4 of 6 reviewers (claude-opus-5-5-xhigh adversarial, kimi-k3-high adversarial, claude-opus-5-5-xhigh edge-case, kimi-k3-high edge-case).
There was a problem hiding this comment.
Verified. In 30224d1 measureMarkDurationMs is gone and the wall-clock is read from the return value of performance.measure(...) in the same evaluate that creates it. A missing mark now throws instead of logging "0ms". Not yet run in CI.
Generated by Claude Code
| const markEnd = `${label}-end` | ||
| const measureName = `${label}-pan-zoom` | ||
|
|
||
| await comfyPage.page.evaluate((name) => performance.mark(name), markStart) |
There was a problem hiding this comment.
⚪ Nit — The start mark is set before perf.startMeasuring() and the end mark after perf.stopMeasuring(). The logged wall-clock time therefore includes harness overhead (CDP getMetrics round trips, rAF handshakes, longtask collection) as well as the pan/zoom interaction. Place the marks immediately around runPanZoomSequence and the settle wait.
Raised by 2 of 6 reviewers (claude-opus-5-5-xhigh adversarial, claude-opus-5-5-xhigh edge-case).
There was a problem hiding this comment.
Verified. The start mark now follows startMeasuring(), and the end mark plus measure is taken after the settle wait and before stopMeasuring(), so the wall-clock excludes the CDP and rAF handshakes. Fixed in 30224d1; not yet run in CI.
Generated by Claude Code
| ]) | ||
|
|
||
| recordMeasurement(cdpMetrics) | ||
| // frameDurationMs is intentionally excluded: PerformanceHelper samples it |
There was a problem hiding this comment.
⚪ Nit — The stated reason for leaving out frameDurationMs appears to be wrong. PerformanceHelper.startMeasuring() starts the rAF sampling loop and stopMeasuring() stops it, so frame durations are sampled during the pan/zoom, not during idle. This drops the per-frame metric that would best separate the two variants; consider adding it to the logged keys.
Raised by 1 of 6 reviewers (claude-opus-5-5-xhigh edge-case).
There was a problem hiding this comment.
Verified: PerformanceHelper.startMeasuring() starts the rAF sampler and stopMeasuring() stops it, so frameDurationMs covers the interaction and the omission comment was wrong. Removed the comment and added frameDurationMs to the logged keys in 30224d1. Left p95FrameDurationMs out because perfReporter has no formatter for it and it would print as a raw float.
Generated by Claude Code
Zoom over the canvas instead of the topbar overlay and assert the scale changes, wait for the attached node count to stabilize on elapsed time before and after the pan/zoom sequence, bracket the wall-clock marks inside the measuring window, derive the wall-clock from the measure itself, log frameDurationMs, and record samples only after the attached-node invariants pass.
|
@benjcooley — this needs one fresh approval at head The main reason is scope, not drift. What you approved was 20 files, +1329 lines — the keep-alive implementation, its unit tests and the setting. Your own branch has since absorbed those commits (everything up to One commit has touched that spec since your approval —
Two things worth your eye rather than mine. The commit also deletes a large block of explanatory comments about why All 67 checks pass at I have deliberately not dismissed your approval. Dismissing it would re-expose your earlier changes-requested at |
Requested by Alexander Brown · Slack thread
Summary
Adds
@perfPlaywright benchmarks comparing "keep every node mounted" vs. viewport retention (Comfy.VueNodes.ViewportKeepAlive) during pan + zoom on a 245-node graph.Changes
browser_tests/tests/vueNodes/viewportKeepAliveBenchmark.spec.ts(moved alongsideviewportKeepAlive.spec.ts) runs a scripted pan-sweep + zoom in/out sequence with retention on and off, each in its own test with a fresh page fixture, reusing the existinglarge-graph-workflowfixture (245 nodes, above the activation threshold inuseViewportKeepAlive.ts). Reports CDP metrics (DOM node delta + absolute count, layouts, task duration, total blocking time) via the existingPerformanceHelper/perfReporterpattern, plusperformance.mark/measurewall-clock timing, logged to console for comparison. Not a regression gate — numbers vary machine to machine; each test asserts only the deterministic per-variant attached-node invariant (on: below a viewport-derived bound; off: equal to the full node count).PerformanceObservers double-counted the first variant's longtask/paint/layout-shift entries into the second (deleted in favor ofPerformanceHelper's existing per-measurement-reset longtask collection); added an absolute DOM node count alongside the existing delta; gated both variants on full node mount + settle before measuring; dropped the post-hocframeDurationMsfield, which measured idle time rather than the interaction; widened the pan/zoom sweep'sdx/dyso it actually crosses viewport boundaries; split the merged on/off test into two independent tests (each with a fresh page) to remove shared-page ordering bias; sized each test's timeout off observed CI durations; and trimmed the file's comments/prose.Review Focus
PerformanceHelpermeasures via a Chromium CDP session, and the repo's existingperformancePlaywright project (which all@perftests run under) is Chromium-only for the same reason — matching that convention rather than forking a new one for this benchmark.Screenshots (if applicable)
N/A — this is a Playwright perf benchmark, not a UI change.