input-mask-ios icon indicating copy to clipboard operation
input-mask-ios copied to clipboard

Poor performance when user types fast

Open kirillzyusko opened this issue 3 years ago • 0 comments

Prerequisites

  • [x] Put an X between 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-mask tag 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:

  1. Clone the project
  2. Change value in userDefinedRuntimeAttribute to [A…] in sample app
  3. Run sample app
  4. 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 😔

kirillzyusko avatar Mar 15 '22 10:03 kirillzyusko