You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: perf.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,8 +96,8 @@ Typecheck verified clean after the sweep (`pnpm tsc --noEmit` passes).
96
96
-**Total findings:** 60
97
97
-**Done `[x]`:** 17
98
98
-**Partial `[~]`:** 2
99
-
-**Skipped `[-]`:**1
100
-
-**Not started `[ ]`:**40
99
+
-**Skipped `[-]`:**5
100
+
-**Not started `[ ]`:**36
101
101
102
102
_(Update these counters as you go.)_
103
103
@@ -929,8 +929,8 @@ for (let i = 0; i < flatRows.length; i++) {
929
929
930
930
## 24. `column_getFilterValue` / `column_getFilterIndex` linear `.find` — Score: 6
931
931
932
-
**Status:**`[]`not started
933
-
**Implementation note:**_(none)_
932
+
**Status:**`[-]`skipped
933
+
**Implementation note:**Per project guidance, `columnFilters` state typically holds 1–3 active filters. At that size, `.find` over the array is essentially O(1) in practice and outperforms a Record/Map lookup (no hashing, no per-rebuild allocation, JIT-friendly). The C × F scale-impact math assumes F grows with C, but in real tables F stays small even when C is large — so the multiplier shown in the table overstates the win. Both alternatives (per-column memo, `table.getColumnFiltersById()`) add overhead that isn't recouped at typical filter counts.
@@ -1092,8 +1092,8 @@ Skip the `row.columnFilters = {}` write when it's already an empty object.
1092
1092
1093
1093
## 30. `existingGrouping.includes(colId)` per cell value access — Score: 7
1094
1094
1095
-
**Status:**`[]`not started
1096
-
**Implementation note:**_(none)_
1095
+
**Status:**`[-]`skipped
1096
+
**Implementation note:**Per project guidance, `grouping` state typically holds 1–3 columns. At that size, `.includes()` on the array is ~2–3 reference comparisons — cheaper than a Set lookup (hash + bucket walk + comparison), and avoids the per-row-model-rebuild Set allocation. The G × C × R scale table assumes G grows; in real grouped tables G is bounded and small, so the constant-factor Set overhead would dominate the saved comparisons. See [[skip-policy-small-state-arrays]] for the project-wide rule.
**Implementation note:**Per project guidance, `grouping` state typically holds 1–3 columns. The L × G scale-table line that shows `L × G` ballooning with L assumes G also grows, but G stays bounded in real tables — so the inner walk is essentially L × constant ≈ O(L), comparable to L + G once the per-call Set allocation and hashing overhead are factored in. Matches the same decision recorded in #39 for the pin-side partition. See [[skip-policy-small-state-arrays]].
@@ -1295,8 +1295,8 @@ for (let i = 0; i < left.length; i++) {
1295
1295
1296
1296
## 36. `[...left, ...right].includes(id)` for center column filtering — Score: 6
1297
1297
1298
-
**Status:**`[]`not started
1299
-
**Implementation note:**_(none)_
1298
+
**Status:**`[-]`skipped
1299
+
**Implementation note:**Per project guidance, `columnPinning` state (`left` + `right`) typically holds 1–3 ids per side. At that size, `.includes()` on the small arrays outperforms a Set (no hashing, no per-call allocation). Same reasoning as #39, which deliberately chose `.includes()` over Sets for the cell-side partition. Note: the per-call `[...left, ...right]` spread itself is wasted work and could be removed without converting to a Set — `(left.includes(id) || right.includes(id))` is the equivalent allocation-free check. Documenting that micro-fix here for any later pass that wants to pick it up; not pursuing it now since it doesn't change asymptotic behavior. See [[skip-policy-small-state-arrays]].
0 commit comments