From cfbd6182a94f0ca265e63c9eb67bf4d6f2a5dc12 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Wed, 29 Jun 2022 13:57:06 +0200 Subject: [PATCH] Explain why parallel --- server/routes/install-routes.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/routes/install-routes.js b/server/routes/install-routes.js index 9755d89..a405a51 100644 --- a/server/routes/install-routes.js +++ b/server/routes/install-routes.js @@ -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(