This repository was archived by the owner on Mar 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
perf: add variables caching #2373
Open
layershifter
wants to merge
13
commits into
master
Choose a base branch
from
perf/variable-cache
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
…st-ui/react into perf/variable-cache � Conflicts: � packages/react-bindings/src/hooks/useStyles.ts � packages/react-bindings/src/styles/resolveStyles.ts � packages/react-bindings/src/styles/types.ts
…om/stardust-ui/react into perf/variable-cache � Conflicts: � packages/react-bindings/src/styles/resolveStyles.ts � packages/react-bindings/src/styles/types.ts � packages/react-bindings/test/styles/resolveStyles-test.ts � packages/react/src/components/Provider/Provider.tsx
Perf comparison
Perf tests with no regressions
Generated by 🚫 dangerJS |
mnajdova
reviewed
Feb 20, 2020
) | ||
}) | ||
|
||
if (!hasOnlyBooleanVariables) { |
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.
Should we just not cache for this instances of components which donot have only boolean
variables instead of throwing an error? We are not throwing if caching is enabled and there are inline overrides, I don't see how this is different.
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.
The main goal to throw:
- easy detect broken cases
- avoid having these conditions in production as here we are iterating via object keys for example
silviuaavram
approved these changes
Feb 24, 2020
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.
This PR adds
enableHardVariablesCaching
which is disabled by default. It allows to handle styles caching for cases whenboolean
variables are used: