Laggy UI response while editing - Test: try Jotai instead of Redux. #6991
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.
It's been some time that I wanted to take a look at it, because in dev, the performance problems are quite noticeable, also, we have reports that in old machines it's unbearable... Luckily, it seems that in production builds, it's not that bad...
Anyways, I think we should be doing something in a non-performant way in the Redux side. Also, the fact that on every key press, all the store gets replaced with that big object, does not help...
So I did a quick try, and I replaced Redux with a Jotai atom and the results are quite good:
Before ( I was typing non-stop all the time...):
sluggish.mov
After:
goodperformance.mov
So, I'd try to find a way to improve the situation using Redux, because anything else would be a breaking change. Maybe reconsider the solution for 19.
@robgietema could you please take a look?