Skip to content

[Performance] Fix player search #187

@jiangtyd

Description

@jiangtyd

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:

  1. 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.)
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions