-
Notifications
You must be signed in to change notification settings - Fork 790
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
Teambuilder: Debounce searching teams #2270
Teambuilder: Debounce searching teams #2270
Conversation
77ba9d9
to
06aa133
Compare
Ten years ago this was instantaneous enough, and computers have only gotten better since then. Probably this should at least be a setting? |
Takes about 5-10s per character input on my device (which has fairly decent specs); this isn't an issue for people who don't store teams, but for people with a lot (I'm around 9K or so), it is... problematic, to say the least. I'm not sure if there's any benefit to not having it debounced (except the removal of the 300ms typing delay), but it offers pretty noticeable benefits for users that do. |
data/pokemon-showdown
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait just saw this; will remove when I get home
06aa133
to
fa6190b
Compare
f589119
to
1fb295f
Compare
Why does this only get laggy at a high team count? Is the team list still hidden somewhere in the DOM? |
Probably that's the bug to fix. |
Thanks! This is a good stopgap until we get a real fix in. |
Only debounce for 500+ teams
Wasn't fun having my browser frozen for half a minute every time I typed more than two letters in the teambuilder search; this PR introduces debounced calls to updateTeamList() instead of direct calls.
Tested locally on Chrome 127.0.6533.72