Enhance perf#285
Conversation
…bleColumnCell when using objectValuesExcept also add some perf tests
…oid over rendering when things change
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| selector, | ||
| shallowEqualObjects as (a: R, b: R) => boolean, | ||
| ); | ||
| } |
There was a problem hiding this comment.
Selector equality check fails for primitive number values
Medium Severity
useComponentStoreSelector uses shallowEqualObjects for equality, but accepts R extends unknown which includes primitives. shallowEqualObjects(5, 6) returns true because Object.keys(number) yields [], so the loop never executes and it reports equality. This means useDataSourceSelector or useInfiniteTableSelector returning a truthy number (e.g., ctx.dataSourceState.dataArray.length) will never trigger a re-render when the value changes.
Additional Locations (1)
| const updateRow = activeRow ?? randomRow; | ||
| const updateCol = activeCol ?? randomCol; | ||
|
|
||
| console.log('updating', updateRow, updateCol); |
There was a problem hiding this comment.
Console.log debugging statements left in source files
Low Severity
Debugging console.log statements are left in two example/test page files. In basic-update.page.tsx, console.log('updating', updateRow, updateCol) logs on every update button click. In use-master-row-info.page.tsx, console.log(masterRowInfo?.data, 'master') logs on every data fetch. These appear to be accidental remnants of development debugging.
Additional Locations (1)
| "paintingTime": 2.43, | ||
| "totalTime": 734.17, | ||
| "threshold": 10 | ||
| }, |
There was a problem hiding this comment.
Duplicate baseline entry with trailing dot typo
Low Severity
The baselines file contains "tests/table/perf/default:horizontal-scrolling." (with a trailing dot) which doesn't match any test name. The file already has the correct entry "tests/table/perf/default:horizontal-scrolling" (without trailing dot) and "...horizontal-scrolling with tracing". This orphaned entry will never be matched and may cause confusion about expected baselines.


Note
Medium Risk
Touches core rendering/context plumbing for
DataSourceandInfiniteTable, so regressions could affect updates, master-detail behavior, and header interactions across many surfaces. Changes are mostly internal API/wiring with added tests, but the breadth of refactor raises risk.Overview
Core perf refactor: Migrates
DataSourceand master-detail context propagation toComponentStore-backed providers, introducinguseDataSourceSelector/useDataSourceState(selector) anduseMasterRowInfo/master-detail selector hooks to avoid broad re-renders. ManyInfiniteTablecomponents/hooks are updated to read only needed slices viauseInfiniteTableSelector/stable context, and header cells now receive DataSource state/actions via props +React.memo.Test/perf updates: Adds new master-detail and tree "flashing" perf pages/specs, expands/updates perf baseline JSONs, and starts tracing in multiple existing specs;
TracingModelbaseline updates now respect a threshold margin and fixtures extend default timeouts. CI workflow triggers also includeexamples/src/**/*.tschanges, and a few minor correctness tweaks land (e.g.currentTargetfor row hover handlers,nodeExpanded: falsein non-tree row params).Written by Cursor Bugbot for commit 8b7d2b5. This will update automatically on new commits. Configure here.