-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: don't call clearTimeout unnecessarily #30109
fix: don't call clearTimeout unnecessarily #30109
Conversation
This is a preventative PR to address performance concerns that have been brought up by partners. There's no evidence of perf regression, but it shows up enough in traces that it might be nice to avoid. Updates the popover state so that the hover delay timeout is only cleared if it **actually exists**.
Perf Analysis (
|
Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
---|---|---|---|---|---|
Avatar | mount | 629 | 640 | 5000 | |
Button | mount | 304 | 310 | 5000 | |
Field | mount | 1141 | 1112 | 5000 | |
FluentProvider | mount | 694 | 705 | 5000 | |
FluentProviderWithTheme | mount | 84 | 78 | 10 | |
FluentProviderWithTheme | virtual-rerender | 64 | 61 | 10 | |
FluentProviderWithTheme | virtual-rerender-with-unmount | 74 | 78 | 10 | |
MakeStyles | mount | 856 | 886 | 50000 | |
Persona | mount | 1775 | 1681 | 5000 | |
SpinButton | mount | 1351 | 1363 | 5000 |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit e33c725:
|
📊 Bundle size reportUnchanged fixtures
|
🕵 fluentuiv9 No visual regressions between this PR and main |
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 2034818a2dd109f3e9f7bb5cdf4caae47a9116d4 (build) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is against common sense: native functions like setTimeount()
and clearTimeout()
are blazing fast. This PR complicates logic and probably is more harmful for performance due an additional hook invoked.
This pull request has been automatically marked as stale because it was marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 5 days of this comment. Thank you for your contributions to Fluent UI! |
This is a preventative PR to address performance concerns that have been brought up by partners. There's no evidence of perf regression, but it shows up enough in traces that it might be nice to avoid.
Updates the popover state so that the hover delay timeout is only cleared if it actually exists.