-
Notifications
You must be signed in to change notification settings - Fork 40
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
Palette page lags when selecting bg color #44
Comments
@pouretrebelle The reason for the lag is every component(button, icons, text, etc) changes its hover/bg/text color based on the selection in the color picker for the background. I'll be happy to try to fix it if you are already not working on it. Views? @colebemis |
Debouncing the update seems like a great idea @aashutoshrathi! Would be a happy to review a PR for this |
Update on this seems like it is already being debounced (200ms by default in GlobalState setters). Adding the piece of code, I'm talking about. Lines 19 to 34 in 3fd0ea8
|
Ah, @aashutoshrathi what if we set those variables using inline styles on the Wrapper instead of inside the styled component definition? Like this:
I think this would prevent unnecessary regeneration of classNames. @aashutoshrathi can you check if this improves the performance? |
Confirming that the performance improves when I declare CSS vars inline. But the catch is, it slows down when we open one of Scales |
was the website taken down? |
|
Hmm, any idea why? |
Inspecting the Scales component, since that's the part causing lag. I will push a patch, if as soon as I find a reason |
@colebemis, I tried finding the cause of lag in the |
Describe the bug
Whenever you try to select a bg color the palette page lags,
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Frames should not drop and the ui should not look laggy/choppy
Environment
Windows 10 chrome 102
Additional context
Reproducible if you run on localhost as well
The text was updated successfully, but these errors were encountered: