-
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
TextInput has performance issue in ^0.55 #18916
Comments
Having the same issue exactly... no need to clear the text even - if I type 3-4 lines it starts to become very laggy. |
may be you can try like that:
|
@wuyunqiang Thanks for the suggestion. In my case I can't use uncontrolled TextInput (ref + setNativeProps) and I think the majority of developers are using the recommended way of setting text via value prop. |
I think this is happening with defaultValue as well. If someone could confirm that would be great. |
You can also set the initial textInput value like this, but this also seems to have the same performance issue:
|
@Waltari10 when I added the text as a child inside |
@ilonashub Yep. I think setNativeProps is probably the best option at this point, just like in your example. |
Have the same issue with setting the |
It would seem this is a pretty significant regression as it causes any react native app using text inputs to be laggy on android. What would be a good way to escalate this? |
I don't know @stueynet but we should definitely bump this up somehow... |
|
I'm looking through the 0.56 pre-release bug fixes (https://github.com/react-native-community/react-native-releases/blob/master/CHANGELOG.md#056) and can't see this issue mentioned. Is this not an issue everyone has? |
Everyone who has a text field has this issue on Android. I am not sure the next steps other than Tweeting. |
Any update on this issue? It's quite a severe regression :/ Fingers crossed it will get resolved quickly. |
Do we know the root cause of this? I understand that the RN team is busy with other, also important things, but maybe we could work on something? |
There's an open PR to revert the changes that caused this regression. #19645 |
I now manually added the patch from here: #19126 and it does fix the issue. Hopefully we can have it in the next release. |
Environment
Environment:
OS: macOS High Sierra 10.13.3
Node: 8.8.0
Yarn: 1.3.2
npm: 5.4.2
Watchman: 4.7.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: Not Found
Packages: (wanted => installed)
react: ^16.0.0 => 16.3.2
react-native: ^0.55.0 => 0.55.3
Steps to Reproduce
Expected Behavior
Input should perform the same after several type/clear cycles.
Actual Behavior
Input becomes laggy after a couple of type/clear cycles.
The text was updated successfully, but these errors were encountered: