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:
parent
4ab59684c1
commit
1a6134e441
2 changed files with 28 additions and 58 deletions
|
@ -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");
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue