Repository navigation
feat(table-core): Further improve tree-shaking across features - #6626
KevinVandy wants to merge 1 commit into
Conversation
Keep column ordering, column pinning, and row expanding code out of the core bundle, route more cross-feature reads through feature stubs, and stop allocating unused onAfterUpdate wrappers in production memos. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: ab37dd3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 17 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
View your CI Pipeline Execution ↗ for commit ab37dd3
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version Preview2 package(s) bumped directly, 15 bumped as dependents. 🟩 Patch bumps
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (22)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughCore utilities now use shared fallbacks for optional column and row features. Column ordering, pinning, visibility, and row expansion call these helpers. The changes also update callback and warning handling, column-size calculations, and devtools bundle measurements. ChangesOptional-feature tree-shaking and bundle data
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Refactor Merge Risk: ⚪ Minimal · up to This change reduces bundle size by moving optional feature code behind shared fallbacks. Behavior is intended to stay the same, and the new tests cover the pinned-region total-size and leaf-column ordering paths. No merge-blocking risk was identified. Pre-merge checks |
|
core/featureStubs.ts(orderLeafColumns,orderByColumnPinning,expandRowModel) call a function that column grouping, column pinning, or row expanding stores on the table ininitTableInstanceData, the same way_aggregateColumnValueworks.constructTabledrops from 5.51 to 5.24 kB brotli, and a minimal ReactuseTablefrom 8.49 to 8.21 kB.features/column-pinning/orderByColumnPinning.ts. It replaces the separate copies in core header groups,row_getVisibleCells, and cell selection's column order.tableMemono longer gives each memo anonAfterUpdatewrapper when there is no callback. Creating 500k row memos used 289 MB of heap instead of 389 MB and ran about 20% faster.process.env.NODE_ENVat each dev warning, so production builds drop the message strings.Notes
_orderByColumnPinning,_orderGroupedColumns, and_expandRowsare untyped private functions stored on the table behind@ts-ignore. Together they account for about 270 B of the core saving. Replacing them with public APIs or static imports is a possible follow-up.🤖 Generated with Claude Code
Summary by CodeRabbit