element-hq / element-hq/element-web
Remove recent messages can freeze the UI
Open
A-Moderation
A-Performance
O-Uncommon
S-Major
T-Defect
- Dominant language
- TypeScript
- Stars
- 13.5k
- Forks
- 2.8k
- PR merge metrics
- PR metrics pending
Description
As discussed in matrix-org/matrix-react-sdk#6114, the remove recent messages dialog can cause the UI to freeze for many seconds when redacting a lot of events at once. This is because there's no way to signal that redactions are being sent in bulk, which means that every individual `cli.redactEvent` call fires `Room.localEchoUpdated` twice just to queue itself up. TimelinePanel listens for these local echo updates and does a force update each time, meaning that if you redact *n* events, TimelinePanel will immediately do *2n* rerenders.
cc @gsouquet
Contributor guide
Assessment
This issue has not been assessed yet.