EventDetailsParticipantsModule makes 20 separate queries to query user page existence for the 20 participants it shows by default. These should be preloaded using LinkBatch, which allows us to run a single query. We should use our own UserLinker::preloadUserLinks that wraps this.
Note that usernames are currently preloaded by ParticipantsStore::getEventParticipants in order to apply the filter, even when no filter is specified. However, EventDetailsParticipantsModule itself does not get a full list of usernames, and instead calls getUserName for each user separately. So, we could also:
- Avoid the username lookup in ParticipantsStore when there is no filter
- Do an explicit username batch lookup in EventDetailsParticipantsModule
- Make sure this doesn't make any extra queries when the list has already been preloaded
- And finally, use the name list to preload links