Skip to content
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

Optimize Colors class to be immutable #565

Merged
merged 2 commits into from
Oct 26, 2023
Merged

Optimize Colors class to be immutable #565

merged 2 commits into from
Oct 26, 2023

Conversation

hrach
Copy link
Contributor

@hrach hrach commented Oct 23, 2023

closes #521

screen-20231023-134649.mp4

@hrach hrach added feature New feature or request semver:minor PRs marker as minor will force next release to bump MINOR version labels Oct 23, 2023
@hrach hrach added this to the Q4/2023 milestone Oct 23, 2023
@hrach hrach self-assigned this Oct 23, 2023
@hrach hrach requested a review from a team as a code owner October 23, 2023 11:45
@hrach hrach changed the title Colors optimization Optimize Colors class to be immutable Oct 23, 2023
ColorScheme is now Immutable, making individual color updates less efficient, but making more common usage of colors more efficient

The reasoning behind this change is that the majority of apps wouldn't have updating individual colors as a main use case.

This is still possible but it will recompose more than before, in turn we significantly decrease the amount of state subscriptions through all of material code and will impact initialization and runtime cost of more standard use cases.
@hrach hrach force-pushed the colors-optimization branch from 05d4669 to 807e6d8 Compare October 23, 2023 13:37
@hrach hrach force-pushed the colors-optimization branch from 807e6d8 to 5dd2b6b Compare October 25, 2023 18:43
@hrach hrach enabled auto-merge October 25, 2023 18:43
@hrach hrach merged commit 9432bf1 into main Oct 26, 2023
1 check passed
@hrach hrach deleted the colors-optimization branch October 26, 2023 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request semver:minor PRs marker as minor will force next release to bump MINOR version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mirror performace optimizations for Colors
3 participants