[performance] Optimize useHover hooks and safePolygon hot paths#4199
[performance] Optimize useHover hooks and safePolygon hot paths#4199atomiks merged 8 commits intomui:masterfrom
Conversation
commit: |
Bundle size report
Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
61789be to
87b8888
Compare
flaviendelangle
left a comment
There was a problem hiding this comment.
Only one concern from Claude Code
Nice to have perf improvement AND bundle size reduction in the same PR 🔥
Codex ReviewOverviewThis PR refactors hover and safePolygon hot paths, extracts shared hover delay helpers, and adds targeted tests around wrapper-trigger handling and safePolygon geometry. I reviewed the full FindingsNo blocking issues found in this patch. 1. ℹ️ [Informational] safePolygon hot path is faster than master in the focused micro-benchmarkImpact: The main performance-sensitive path reviewed here shows a measurable win relative to Evidence:
Recommendation: No change required for this path based on current evidence. 2. ℹ️ [Informational] DRY simplification in hover delay utilities is cleanImpact: Delay resolution and pointer-type gating are now centralized, which lowers maintenance surface without changing public behavior. Evidence: Recommendation: Keep this structure as-is. Confidence: 4/5High confidence from a full-branch diff review, targeted behavioral tests in touched modules, and a direct head-vs-master micro-benchmark on the main hot path. Notes
|
97dd2b9 to
c9874e3
Compare
5417a32 to
5ee47db
Compare
Purely perf-related change for bundle size + runtime cost