element-hq / element-hq/element-web

Favorite room action feels very sluggish and does not always update

Open
#21,200 2 comments 0 reactions 0 assignees View on GitHub
A-Performance A-Room-List O-Occasional S-Tolerable T-Defect Z-Papercuts
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

### Problem

When favoriting or unfavoriting a room, it takes multiple seconds before the room list updates. I assume this is due to us waiting for requests to fly around but there seems to be something more weird going on.

Often times, I have to do the favorite action multiple times (even waiting for `/sync` to settle) in between. I can see the `m.favourite` request succeed but the UI does not update.

Relevant requests:

- `PUT /_matrix/client/r0/user/%40madlittlemods%3Amatrix.org/rooms/!abc/tags/m.favourite`
- `DELETE /_matrix/client/r0/user/%40madlittlemods%3Amatrix.org/rooms/!abc/tags/m.favourite`

![](https://user-images.githubusercontent.com/558581/155560919-71dff179-cdab-452d-84c0-332a3391d069.png)

### Potential solutions

When favoriting rooms, optimistically update the UI. Or at the minimum, update the UI when we see the `m.favourite` requests succeed. (local echo)

### Related issues

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

### Logs

Logs in case that helps: https://github.com/matrix-org/element-web-rageshakes/issues/11073

---

- Favorite room action is slow

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.