input-mask-ios
input-mask-ios copied to clipboard
Poor performance when user types fast
Prerequisites
- [x] Put an
Xbetween the brackets on this line if you have done all of the following:- read our Wiki;
- read the entire Known issues section;
- checked that my issue isn't already filled;
- searched StackOverflow's
input-masktag for similar problems.
Describe the bug
Hi @taflanidi First of all I wanted to say thank you for the great lib!
However, I found, that if I type really fast, then the input is handled slower, than I typing.
Steps to reproduce the behaviour:
- Clone the project
- Change
valueinuserDefinedRuntimeAttributeto[A…]in sample app - Run sample app
- try to type any random symbols but do it really fast 🙂
Expected behaviour
User should type as fast as he can and no lags/delays should occur (as when using a normal UITextField)
Actual behaviour
In the beginning I can type in real time mode. However after given time (when I typed quite a lot of characters) the process becomes slower and slower and at some point you can stop typing, but you will see, how new characters still appears.
Screenshots
https://user-images.githubusercontent.com/22820318/158359490-3edf5610-5852-4b29-baa8-941412a05843.mov
After the sixth second I don't type anymore, but the characters continue to appear. UI thread FPS goes to 0.
Platform information
- OS version: 15.2
- Library version: 6.1.0
- Language: Swift 5
- Device (if bug is device-specific): I think it's not device-specific, because the issues was reproducible on iPhone 7 (real device) too.
Additional context
I didn't dig into the implementation, so I can not say, where the performance drop occurs 😔