Broadcast send_join concurrent to other operations; pre-gather state concurrently.

Broadcast send_knock concurrently.

Concurrent access check for fed event.

Concurrent gather for state responses.

Populate room_version for format_pdu to elide repeated queries.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-09-25 01:05:12 +00:00
parent b9c790326a
commit 85b3de055d
8 changed files with 159 additions and 95 deletions

View File

@@ -53,6 +53,12 @@ pub(crate) async fn get_backfill_route(
.ready_fold(PduCount::min(), cmp::max)
.await;
let room_version = services
.state
.get_room_version(&body.room_id)
.await
.ok();
Ok(get_backfill::v1::Response {
origin_server_ts: MilliSecondsSinceUnixEpoch::now(),
@@ -79,7 +85,7 @@ pub(crate) async fn get_backfill_route(
.and_then(|pdu| {
services
.federation
.format_pdu_into(pdu, None)
.format_pdu_into(pdu, room_version.as_ref())
.map(Ok)
})
.try_collect()