This repository was archived by the owner on Mar 4, 2020. It is now read-only.
WIP: perf(theme): optimize theme handling#1006
Closed
levithomason wants to merge 7 commits intomasterfrom
Closed
Conversation
Member
|
I can be wrong, but Lodash memoizes only the first param, lodash/lodash#2115. |
81fb3d8 to
e97cc00
Compare
move fela types to /types add many perf flags and logging wip wip wip Add rtl-css-js to node_modules_fela Fix performance is undefined during build add mark to for processStyleWithPlugins add SKIP_FELA_PLUGINS add mark for getUnhandledProps add mark for generateColorScheme wip drop cruft update context usage perf tooling add perf tests remove examples update felaDevMode
08b549a to
b31482a
Compare
…dust-ui/react into perf/theming # Conflicts: # docs/src/examples/components/Chat/Performance/Chat.perf.tsx # docs/src/examples/components/Chat/Performance/index.tsx
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 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.
Merging themes on context is a hot code path. It is also heavy due to merging themes and applying variables.
This PR is experimenting with approaches to optimize this path for all components.
Initial results are promising, just memoizing
mergeThemesproduces 75-95% performance gain in all components: