Commit 626193a
committed
perf: delete the layout operation log
Every layout operation appended to a Y.Array that nothing ever read.
`getOperationsSince` and `getOperationsByActor` were not on the LayoutStore
interface and had no callers outside the one test that exercised the log
itself; both were marked as being for a future sync feature that no provider
exists for.
It was not free. The array is never trimmed, so per-operation cost grew with
session length. Measured on `moveNode` with an entry present: 197 us/op with
22k entries logged, 375 us/op at 40k. Without the log, 5.4 us/op and flat
(2.9 us/op after another 18k operations) — the growth disappears with it.
This is a live cost in Vue nodes mode today, on every drag frame and every
resize, and it is what made registering node geometry at attach look
unaffordable for the legacy canvas: dragging 100 selected nodes went from
10.8 ms/frame (65% of a 16.7ms frame) to 0.60 ms/frame (3.6%).
The store's test helper observed operations through the log; it spies on
applyOperation instead, which is what nodeSizeReflow.test.ts already did.1 parent 5fbd317 commit 626193a
2 files changed
Lines changed: 7 additions & 69 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| |||
470 | 474 | | |
471 | 475 | | |
472 | 476 | | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | 477 | | |
513 | 478 | | |
514 | 479 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
105 | 104 | | |
106 | 105 | | |
107 | 106 | | |
| |||
183 | 182 | | |
184 | 183 | | |
185 | 184 | | |
186 | | - | |
187 | 185 | | |
188 | 186 | | |
189 | 187 | | |
| |||
833 | 831 | | |
834 | 832 | | |
835 | 833 | | |
836 | | - | |
837 | | - | |
838 | | - | |
839 | | - | |
840 | 834 | | |
841 | 835 | | |
842 | 836 | | |
| |||
1363 | 1357 | | |
1364 | 1358 | | |
1365 | 1359 | | |
1366 | | - | |
1367 | | - | |
1368 | | - | |
1369 | | - | |
1370 | | - | |
1371 | | - | |
1372 | | - | |
1373 | | - | |
1374 | | - | |
1375 | | - | |
1376 | | - | |
1377 | | - | |
1378 | | - | |
1379 | | - | |
1380 | | - | |
1381 | | - | |
1382 | | - | |
1383 | | - | |
1384 | | - | |
1385 | | - | |
1386 | | - | |
1387 | 1360 | | |
1388 | 1361 | | |
1389 | 1362 | | |
| |||
0 commit comments