Open mikemccllstr opened 12 years ago
I'd recommend revamping that page. Get rid of the link to every game the player has ever played. That just doesn't scale well. Instead just have the records against each opponent with the opponent's name. Clicking on the opp's name can bring up a game search page where it shows games that had both players.
You might want to have an new collection with a compound key containing the player's name and the opponent's name. It would the record against that opponent (possibly in a beefed up RecordSummary class made to support the ListSlotPrimitiveConversion interface). This means you'd store record twice, once for player X vs player Y, and a second time in the other order for player Y vs player X, so all the records for any given player will be adjacent in the collection, which should mean your scan will by primary player will be fast.
From Rob's post in councilroom-dev:
Not sure what is required to be precalculated in advance, but it is distinctly slow for users with large game counts.