Explain why parallel

This commit is contained in:
Eric Eastwood 2022-06-29 13:57:06 +02:00
parent 4690349816
commit cfbd6182a9
1 changed files with 2 additions and 0 deletions

View File

@ -133,6 +133,8 @@ function installRoutes(app) {
// TODO: Highlight tile that matches ?at=$xxx
//const aroundId = req.query.at;
// Do these in parallel to avoid the extra time in sequential round-trips
// (we want to display the archive page faster)
const [roomData, { events, stateEventMap }] = await Promise.all([
fetchRoomData(matrixAccessToken, roomIdOrAlias),
fetchEventsInRange(