add corks to coalesce writes for several heavy calltrees.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
3f60365cc6
commit
61b1d6d869
3 changed files with 13 additions and 0 deletions
|
@ -221,6 +221,9 @@ impl Service {
|
|||
leaves: Vec<OwnedEventId>,
|
||||
state_lock: &MutexGuard<'_, ()>, // Take mutex guard to make sure users get the room state mutex
|
||||
) -> Result<Vec<u8>> {
|
||||
// Coalesce database writes for the remainder of this scope.
|
||||
let _cork = services().globals.db.cork_and_flush()?;
|
||||
|
||||
let shortroomid = services().rooms.short.get_shortroomid(&pdu.room_id)?.expect("room exists");
|
||||
|
||||
// Make unsigned fields correct. This is not properly documented in the spec,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue