-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
0.44.0 TextInput with child CPU goes to 100% after 300 chars #13908
Comments
Seems related: |
Still seeing this issue in 0.45.1 @shergin - any chance you could take a look? paste the following text into the textInput to replicate, after this typing more text sends CPU over 100%
|
@balasan That you for the heads up! |
Just wanted to create the same issue. I created a snack for it and some gifs to illustrate, I'll drop them in here. https://snack.expo.io/ryain5X4- In the gifs I reload an app View with a lot of text twice. Passing as valuePassing as Text child |
@shergin I did some debugging & profiling and seems like the bottleneck happens RCTShadowText.m line 211:
If I comment out that line text input works as expected with long text (although all other text becomes invisible) Not sure why this happens or how to fix it yet... Most of that code seems to be the same as v0.43 which doesn't have any problems. |
Oh my, we actually should not layout nodes for at all. |
Hi @shergin, how likely will this be fixed? we kinda needed the nested text inside for mentions support. at the moment we have to limit the |
@huangmr It definitely will be fixed. The question is when. 😞 |
fixed with 6b11259 |
@maartenschumacher Thank you for confirming! 🎉 |
Description
When typing inside a multiline textInput, after around 300 - 400 characters, CPU shoots up to 100%. Once you stop typing, CPU goes back down. Typing a few more characters causes the CPU to shoot up to 100% again.
This happens in simulator and device and sometimes leads to a crash.
This does not happen where there is no child and the value prop is used.
Reproduction Steps and Sample Code
Sample code follows, using Sample React Native App using nothing but TextInput. Remember, you need to have around 300 - 400 characters in the input to start seeing the problem.
Solution
?
Additional Information
The text was updated successfully, but these errors were encountered: