Explain why parallel
This commit is contained in:
parent
4690349816
commit
cfbd6182a9
|
@ -133,6 +133,8 @@ function installRoutes(app) {
|
||||||
// TODO: Highlight tile that matches ?at=$xxx
|
// TODO: Highlight tile that matches ?at=$xxx
|
||||||
//const aroundId = req.query.at;
|
//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([
|
const [roomData, { events, stateEventMap }] = await Promise.all([
|
||||||
fetchRoomData(matrixAccessToken, roomIdOrAlias),
|
fetchRoomData(matrixAccessToken, roomIdOrAlias),
|
||||||
fetchEventsInRange(
|
fetchEventsInRange(
|
||||||
|
|
Loading…
Reference in New Issue