1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-30 02:21:17 +03:00

Fix another freeze on room switch (#7900)

* Fix another freeze on room switch

This switches permalinks to use the batch state update event and
removes the incremental updates, as commented. We now spend, on my
profiling, about 450ms in setOutOfBandMembers itself and another
120ms in permalinks.

Fixes https://github.com/vector-im/element-web/issues/21127

* Just bind to the currentstate state updates
This commit is contained in:
David Baker
2022-02-25 19:48:35 +00:00
committed by GitHub
parent 4ab59684c1
commit 1a6134e441
2 changed files with 28 additions and 58 deletions

View File

@ -122,14 +122,14 @@ describe('Permalinks', function() {
},
member95,
]);
const creator = new RoomPermalinkCreator(room, null, false);
const creator = new RoomPermalinkCreator(room, null);
creator.load();
expect(creator._serverCandidates[0]).toBe("pl_95");
member95.membership = "left";
creator.onMembership({}, member95, "join");
creator.onRoomStateUpdate();
expect(creator._serverCandidates[0]).toBe("pl_75");
member95.membership = "join";
creator.onMembership({}, member95, "left");
creator.onRoomStateUpdate();
expect(creator._serverCandidates[0]).toBe("pl_95");
});