Draft
Conversation
- Add vitest bench infrastructure: render, hook, and utility benchmarks - Memoize HeaderCell with React.memo to prevent unnecessary re-renders - Pre-compute sort info via Map in HeaderRow instead of per-cell findIndex - Stabilize sort callback identity with useLatestFunc - Lazy-copy templateColumns array in useColumnWidths (only spread when needed) - Replace columnMetrics Map with plain array for faster index-based access Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3995 +/- ##
==========================================
+ Coverage 97.51% 97.52% +0.01%
==========================================
Files 36 36
Lines 1449 1456 +7
Branches 463 468 +5
==========================================
+ Hits 1413 1420 +7
Misses 36 36
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
HeaderCellwithReact.memo, pre-compute sort info viauseMemoMap inHeaderRow, and stabilize callback identity withuseLatestFunc— eliminating per-cell O(n)findIndexscans and unnecessary re-renderstemplateColumnsarray inuseColumnWidths(only spread when modifications are needed)columnMetricsMap with plain array inuseCalculatedColumnsfor faster index-based access in viewport calculationTest plan
npm run bench🤖 Generated with Claude Code