Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Minor improvements to filtering performance #5054

Merged
merged 10 commits into from
Jul 28, 2020
Merged

Minor improvements to filtering performance #5054

merged 10 commits into from
Jul 28, 2020

Conversation

turt2live
Copy link
Member

For element-hq/element-web#14750

These changes are likely best reviewed commit-by-commit.

Collectively these do not improve the situation too well: on a test account they have reduced times for 2.0 seconds to 1.4 seconds per key. We do have some throttle logic in place in these changes, however in this account's case it does not help as the task overall takes longer than the keypress handling.

There is not much more we can do to improve this situation. We can't lazily load room tiles, can't render them elsewhere to put them into the DOM, and can't do much about how tooltips work. If we could somehow do one of these three, it could increase performance by 1-5x. For now though, this is likely going to have to be fine.

This is a step towards the room list not having to concern itself with the search parameters.
This prevents the entire left panel from having to re-mount whenever the search query changes.
It's a bit more complicated this way, but helps reduce some of the latency involved in remounting the entire room list.
It slows things down a bit, and in practice is more unlikely to be a problem than a savior.
This is just maintenance noticed while debugging.
This could in theory cause double rendering of the room list under some conditions.
This reduces the update cost of rooms changing, and fixes a bug where when a sublist became filtered it would change the notification count of the sublist.

This does change the expected usage of the state store to ensuring that only one place updates the rooms on the list states, which is currently the room list store. Ideally the state store could listen to the room list store to update itself, however due to a complicated require() loop it is not possible.
@turt2live turt2live requested a review from a team July 27, 2020 23:44
src/utils/arrays.ts Outdated Show resolved Hide resolved
Co-authored-by: Michael Telatynski <[email protected]>
@turt2live turt2live merged commit 3561de3 into develop Jul 28, 2020
@turt2live turt2live deleted the travis/perf6 branch July 28, 2020 12:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants