forked from garsh0p/garpr
-
Notifications
You must be signed in to change notification settings - Fork 13
[Performance] Fix player search #187
Copy link
Copy link
Open
Labels
Milestone
Description
Player search currently requests all players in the db, and filters them client-side. This is unacceptably slow nowadays (which is why I'm marking this as a bug.)
There are a number of ways in which this can be improved:
- Make an ajax request based on what the user has typed so far. This was bad because we hammered the server with too many requests, so we can debounce the requests (see debounce player search autocomplete #174 from many months ago.)
- We can continue to cache the list of players that have been loaded on the client side as well.
2a. It seems like currently, when we make a POST request, the client-side cache of players is cleared and we have to fetch it again; we could try to persist the cache across POSTs as well (with perhaps some invalidation mechanism for the changed players?) I don't feel too worried about the consistency of player names.
Reactions are currently unavailable