This repository has been archived by the owner on Mar 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
perf(tooltip): Simplify rendering when tooltip is not visible #1981
Merged
Conversation
This file contains 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
jurokapsiar
requested review from
dvdzkwsk,
kuzhelov,
layershifter,
levithomason,
miroslavstastny and
mnajdova
as code owners
September 27, 2019 17:53
jurokapsiar
commented
Sep 30, 2019
docs/src/examples/components/Chat/Performance/CustomToolbar.perf.tsx
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #1981 +/- ##
=======================================
Coverage 77.01% 77.01%
=======================================
Files 158 158
Lines 5456 5456
Branches 1578 1578
=======================================
Hits 4202 4202
Misses 1241 1241
Partials 13 13
Continue to review full report at Codecov.
|
layershifter
reviewed
Oct 3, 2019
packages/react/src/themes/teams/components/Tooltip/tooltipStyles.ts
Outdated
Show resolved
Hide resolved
layershifter
approved these changes
Oct 3, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Based on the perf measurements, I found out that adding tooltips to the toolbar items has significant perf impact (~20% on my machine). This PR simplifies the rendering if the tooltip is not visible (it has to be in the DOM for accessibility purposes). The change seems to get back half of the degradation, see the perf measurements below.
Added CustomToolbar.perf.tsx to do the measurements.
Before:
After: