callstack / react-native-paper

Material Design for React Native (Android & iOS)
https://reactnativepaper.com
MIT License
12.51k stars 2.05k forks source link

iOS 14.2 - UI goes to 10 fps when TextInput secureTextEntry=true #2433

Closed VictorioMolina closed 3 years ago

VictorioMolina commented 3 years ago

Current behaviour

The app goes too slow when I start typing in a form with a textinput for passwords.

Expected behaviour

No lag.

Code sample

import React from "react"
import { View } from "react-native"
import { TextInput, useTheme } from "react-native-paper";

export default function App()  {
   return (
     <View>
        <TextInput
            placeholder="Email or username"
            maxLength={50}
          />

          <TextInput
             placeholder="Password"
             maxLength={30}
             secureTextEntry={true}
          />
      </View>
   )
}

What have you tried

If I set secureTextEntry to false, all works fine.

Your Environment

software version
ios 14.2
react-native ^0.63.3
react-native-paper ^4.5.0
node 12.18.1
yarn 1.22.4
expo sdk 39.0.0
github-actions[bot] commented 3 years ago

Couldn't find version numbers for the following packages in the issue:

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

The versions mentioned in the issue for the following packages differ from the latest versions on npm:

Can you verify that the issue still exists after upgrading to the latest versions of these packages?

VictorioMolina commented 3 years ago

Solved with iOS 14.4

ShevO27 commented 3 years ago

@VictorioMolina what to do on iOS <14.4?

Seriosus commented 2 months ago

I'm using iOS 17.1 and this performance issue is still on even latest expo/rn version.

The funny thing is when secureTextEntry is true, performance goes insanely low, till there are some count of chars on the text input, like 15 or 14 chars, then performance is fine, but if I delete chars to be lower than 15 or 14 chars again goes the low performance, even deleting the whole value at once, massively low performance again.

If I set secureTextEntry to false, then problem is gone at all.

dwolrdcojp commented 2 months ago

I can confirm experiencing the same thing with secureTextEntry set to true on iOS 17.4.1 and latest expo go v 2.30.10

Bialson commented 3 weeks ago

Also here, I'm experiencing this in the latest iOS version and Expo SDK 51 with dev client