Skip to content

[Performance] Pagination and reduction in calls to slow routes #195

@jiangtyd

Description

@jiangtyd

The first time we load the app, we make a number of very expensive ajax calls.

GET /[region]/players
GET /[region]/rankings (x2)
GET /[region]/tournaments
GET /[region]/tournaments?includePending=true (for admins)
GET /[region]/merges (for admins)

We don't need to do these expensive gets ASAP when we load the page, and we don't need to get all tournaments / players / possibly rankings immediately.

Possible improvements:

  1. Don't make two calls to /rankings
  2. Don't make calls to pages that we aren't looking at?
  3. Paginate /tournaments and /players
    a. Add tournament search?
    b. Add stats like "total number of players / tournaments" in case people want those?
  4. Possibly paginate /rankings?

See this dev tools network log for reference:
garpr_xhr

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions