Opened 8 years ago

Last modified 7 years ago

#3840 closed enhancement

Lobby - cache player profiles — at Version 1

Reported by: elexis Owned by:
Priority: Nice to Have Milestone: Alpha 22
Component: Multiplayer lobby Keywords:
Cc: Patch:

Description (last modified by elexis)

Currently there are a lot of useless requests for player-profiles done. For example when clicking on the same user twice or changing the sort order of the playerlist in the lobby, the viewed profile will be reloaded.

But since the ratings didn't change, the profile will be identical. Thus it can just as well be cached and the cache cleaned once any rating changed.

It should be sufficient to operate on lobby.js, but feel free to ask on IRC for further information (see wiki:GettingStartedProgrammers)!

Change History (1)

comment:1 by elexis, 7 years ago

Description: modified (diff)
Keywords: simple removed

Phab:D688 for fixing the early return committed in r17924, thus fixing the issue described in the ticket.

Caching could, and probably should, still be done, so that it doesn't have to be releoaded when selecting different players back and forth. However that should be done at the C++ level. Perhaps it could even be changed so that the stats of the entire playerlist are sent and then only updates in case of rated 1v1s being played.

Note: See TracTickets for help on using tickets.