-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
perf: undebounce autocomplete #26491
perf: undebounce autocomplete #26491
Conversation
@barredterra autocomplete tests breaking 👀 Probably needs some delay (?) recording just shows everything going too fast and wrong. |
5446b86
to
2febb65
Compare
2febb65
to
cc4d369
Compare
@ankush I tried different combinations of typing + waiting, but can't seem to figure out what's cypress's problem. Currently it seems like it blurs/resets the input instead of selecting the option. Could you give it a try? |
@barredterra try very small debounce maybe 👀 100ms won't be noticeable to users. |
This comment was marked as outdated.
This comment was marked as outdated.
A smaller, 100 ms debounce also did not help, cypress still fails (see #26765). |
@Mergifyio backport version-15-hotfix |
Most "Autocomplete" fields have their options set in advance, so debouncing on input is pointless here. For example, the Country field in Holiday List:
Before:
country-debounced.mov
After:
country-fast.mov
Even when calling an API, waiting for half a second significantly worsens the experience. For example, address autocompletion.
Before:
address-debounced.mov
After:
address-fast.mov
Removing this debounce results in a snappier UX and does not impose rate limiting, which is unnecessary in the first case and unwanted in the second.