You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the room list is regenerated from scratch every time the user receives a message or other event which triggers an update. This can lead to some serious performance issues on large accounts when the algorithm is touched in the slightest way due to amplification.
There's a couple options here:
Change the algorithm to be smart about sorting the list and shuffle rooms around as needed rather than regenerate it. This is difficult to get right because the conditions to trigger a reorder aren't perfect and can easily lead to stuck rooms.
Figure out how to make React prefer to keep elements around instead of destroying them. Currently, the bulk of the reorder operation is actually React trying to render all 2k+ tiles. The actual ordering can take less than 50ms for the whole list, and hundreds of milliseconds to render.
Both of these issues aren't really a problem yet, but as mentioned can quickly become an issue if the algorithm is changed slightly. For instance, calling the SettingsStore within the sort function can cause delays of 5+ seconds per cycle.
For now, it's probably best we just be extremely careful in modifying the algorithm instead of rewriting it to be less prone to causing performance issues.
The text was updated successfully, but these errors were encountered:
Currently the room list is regenerated from scratch every time the user receives a message or other event which triggers an update. This can lead to some serious performance issues on large accounts when the algorithm is touched in the slightest way due to amplification.
There's a couple options here:
Both of these issues aren't really a problem yet, but as mentioned can quickly become an issue if the algorithm is changed slightly. For instance, calling the SettingsStore within the sort function can cause delays of 5+ seconds per cycle.
For now, it's probably best we just be extremely careful in modifying the algorithm instead of rewriting it to be less prone to causing performance issues.
The text was updated successfully, but these errors were encountered: