Skip to content

Enhance perf#285

Merged
radubrehar merged 18 commits intomasterfrom
enhance-perf
Feb 16, 2026
Merged

Enhance perf#285
radubrehar merged 18 commits intomasterfrom
enhance-perf

Conversation

@radubrehar
Copy link
Copy Markdown
Contributor

@radubrehar radubrehar commented Feb 16, 2026

Note

Medium Risk
Touches core rendering/context plumbing for DataSource and InfiniteTable, 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 DataSource and master-detail context propagation to ComponentStore-backed providers, introducing useDataSourceSelector/useDataSourceState(selector) and useMasterRowInfo/master-detail selector hooks to avoid broad re-renders. Many InfiniteTable components/hooks are updated to read only needed slices via useInfiniteTableSelector/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; TracingModel baseline updates now respect a threshold margin and fixtures extend default timeouts. CI workflow triggers also include examples/src/**/*.ts changes, and a few minor correctness tweaks land (e.g. currentTarget for row hover handlers, nodeExpanded: false in non-tree row params).

Written by Cursor Bugbot for commit 8b7d2b5. This will update automatically on new commits. Configure here.

Comment thread examples/src/pages/tests/table/props/data/basic-update.page.tsx
Comment thread source/src/components/InfiniteTable/hooks/useCellRendering.tsx
@radubrehar radubrehar merged commit bc7349b into master Feb 16, 2026
2 of 3 checks passed
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Fix in Cursor Fix in Web

const updateRow = activeRow ?? randomRow;
const updateCol = activeCol ?? randomCol;

console.log('updating', updateRow, updateCol);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Fix in Cursor Fix in Web

"paintingTime": 2.43,
"totalTime": 734.17,
"threshold": 10
},
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant