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(renderComponent): avoid multiple style function calls #1957
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
Codecov Report
@@ Coverage Diff @@
## master #1957 +/- ##
==========================================
- Coverage 70.31% 70.26% -0.05%
==========================================
Files 894 893 -1
Lines 7895 7891 -4
Branches 2287 2309 +22
==========================================
- Hits 5551 5545 -6
- Misses 2331 2333 +2
Partials 13 13
Continue to review full report at Codecov.
|
layershifter
requested review from
dvdzkwsk,
kuzhelov,
levithomason,
miroslavstastny and
mnajdova
as code owners
September 23, 2019 10:17
layershifter
commented
Sep 23, 2019
### Documentation | ||
- Remove Usage tab @lucivpav ([#1948](https://github.com/stardust-ui/react/pull/1948)) | ||
- Put props on a single page, fix props links @lucivpav ([#1892](https://github.com/stardust-ui/react/pull/1892)) | ||
|
||
### Documentation |
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.
Oops, duplicate
miroslavstastny
approved these changes
Sep 23, 2019
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.
👍
layershifter
added a commit
that referenced
this pull request
Sep 26, 2019
(cherry picked from commit 267a8bc)
Merged
layershifter
added a commit
that referenced
this pull request
Sep 26, 2019
(cherry picked from commit 267a8bc)
layershifter
added a commit
that referenced
this pull request
Sep 26, 2019
* perf(renderComponent): avoid multiple style function calls (#1957) (cherry picked from commit 267a8bc) * fix(tooltip): Make tooltip visible for screen reader (#1942) (cherry picked from commit 8295ce9) * docs: add version header to CHANGELOG * docs: changelog fix header comment * docs: update changelog
layershifter
added a commit
that referenced
this pull request
Oct 1, 2019
(cherry picked from commit 267a8bc)
This was referenced Oct 2, 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.
📖 Story around
We need to compute
classes
andstyles
to pass them to components and pass down to slots. However, we previously we did the same amount of work twice:resolveStyles()
andmergedStyles()
resolved styles twice and means that all style functions were called twice. With these changesgetClasses()
will use already resolvedstyles
to avoid double calls.🐎 Measures
cross-env PERF=true gulp perf --filter *Chat.perf.tsx --times=100
Performance diff is around 5.80%.
Before
After