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
Debounce compose form #17396
Debounce compose form #17396
Conversation
I'd much rather we find the source of these re-renders than set a debounce… |
Investigating a bit more, I can't find the reason it would be re-rendered more than once per keypress, and I also can't see it render more than the compose form itself. There's definitely some optimization to be done in the compose form render itself (mainly, optimize and memoize some of I'm not completely against debouncing the |
Everything is very fast on my computer, so I have trouble evaluating the changes, but could you check whether #17463 improves the situation for you? |
Multiple render problem is caused on Firefox with compositing IME. related: facebook/react#3926 I'll check #17463 later on my beta instance |
Update: I test with #17463. But sadly, Missing characters glitch happening again on my laptop with firefox. |
Thanks for testing! I wonder if the missing character issue is a performance issue, or React and the IME somehow fighting over the value of the textarea? Did you notice any performance improvement with #17463? Either way, we probably need something like debouncing or handling |
I'm back from digging about composition[start,end,update] thing! |
Do you have more on that? |
Multiple renders at one keystroke was problem of IME (word commit and something else) |
Compose form's textarea was in a hell of re-rendering. Especially in CJK IME
It causes missing characters on low powered machines (even on my brand-new laptop), And it happened a lot and user experience was terrible as a Korean user.
As an example, I typed
가나다
(3 letters but 6 types)Before
I don't know why they re-render more than 6 times (Maybe multiple hooks are used for onChange, onKeyup, onKeydown).
After
I set timeout to 1ms. It is enough to remove struggling effects, And also auto suggestions (mention, emoji, hashtag) are fine