Room list: avoid excessive re-renders on room list store update or filter change#32663
Merged
florianduros merged 7 commits intodevelopfrom Mar 2, 2026
Merged
Conversation
Clearing all the item vms at every room list change is causing massive re-render of all the room list items. References to the vms are already removed when out of view (see RoomListViewMode.updateVisibleRooms) and handled by GC.
RoomListView re-renders on update but the filters (children) don't need to. Add a memo to avoid excessive-rerenders.
langleyd
reviewed
Feb 27, 2026
| this.updateRoomsMap(this.roomsResult); | ||
|
|
||
| // Clear view models since room list changed | ||
| this.clearViewModels(); |
Member
There was a problem hiding this comment.
I suppose the flip side of this is that some of these VMs will had around int he map until removed. But as you said when the visible rooms change they will be cleaned up.
33e3c01 to
6b45c3e
Compare
6c7d583 to
ab98499
Compare
2b671dd to
21ce510
Compare
21ce510 to
9af857b
Compare
9af857b to
e357d4e
Compare
…m list is updated The filterKeys are passed in the virtuoso context so it should reduce internal computing The filter ids array has always the same value, there is no point to create a new instance.
e357d4e to
36646e4
Compare
florianduros
added a commit
that referenced
this pull request
Mar 2, 2026
The room list needs to listen to `CallEvent.Participants` to be able to display the Call icon. This was working before #32663 due to an excessive re-renders or relying on the notification events.
github-merge-queue bot
pushed a commit
that referenced
this pull request
Mar 2, 2026
* feat(call store): add new `CallEvent.Participants` event The room list needs to listen to `CallEvent.Participants` to be able to display the Call icon. This was working before #32663 due to an excessive re-renders or relying on the notification events. * chore(room list): listen to `CallEvent.Participants` * test(room list): add test for new listener * test(call store): add tests for `CallEvent.Particpants` * Revert "feat(call store): add new `CallEvent.Participants` event" This reverts commit d2a7a00. * Revert "test(call store): add tests for `CallEvent.Particpants`" This reverts commit 4455182. * chore(room list): listen to `Call#CallEvent.Participants` insteaf of listening to `CallStore` * test(room list): update added test * fix(room list): clean properly listeners on previous call * test(room list): add missing test * fix(room list): don't use trackListeners to avoid leaking memory when listening to call event * fix(room list): listen to participant change when vm is created * test(room list): add test case when there is an existing call
alexlebens
pushed a commit
to alexlebens/infrastructure
that referenced
this pull request
Mar 10, 2026
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [vectorim/element-web](https://github.com/element-hq/element-web) | patch | `v1.12.11` → `v1.12.12` | --- ### Release Notes <details> <summary>element-hq/element-web (vectorim/element-web)</summary> ### [`v1.12.12`](https://github.com/element-hq/element-web/releases/tag/v1.12.12) [Compare Source](element-hq/element-web@v1.12.11...v1.12.12) #### ✨ Features - Add stable support for MSC4380 invite blocking ([#​31966](element-hq/element-web#31966)). Contributed by [@​richvdh](https://github.com/richvdh). - Hide the names of banned users behind a spoiler tag ([#​32424](element-hq/element-web#32424)). Contributed by [@​andybalaam](https://github.com/andybalaam). - Room list: remove bold effect on selected room ([#​32593](element-hq/element-web#32593)). Contributed by [@​florianduros](https://github.com/florianduros). - Use Compound buttons in auth screens ([#​32562](element-hq/element-web#32562)). Contributed by [@​t3chguy](https://github.com/t3chguy). - Track room list sorting algorithm changes ([#​32556](element-hq/element-web#32556)). Contributed by [@​MidhunSureshR](https://github.com/MidhunSureshR). - Update `sso_redirect_options` to work for Native OIDC ([#​32537](element-hq/element-web#32537)). Contributed by [@​t3chguy](https://github.com/t3chguy). #### 🐛 Bug Fixes - Room list: avoid excessive re-renders on room list store update or filter change ([#​32663](element-hq/element-web#32663)). Contributed by [@​florianduros](https://github.com/florianduros). - Room list: listen to call event to check number of participants ([#​32677](element-hq/element-web#32677)). Contributed by [@​florianduros](https://github.com/florianduros). - Fix invite-specific join errors not being shown ([#​32621](element-hq/element-web#32621)). Contributed by [@​Half-Shot](https://github.com/Half-Shot). - Prevent logging lots of "Browser unsupported" lines ([#​32647](element-hq/element-web#32647)). Contributed by [@​Half-Shot](https://github.com/Half-Shot). - Update critical gradient for room status bar ([#​32575](element-hq/element-web#32575)). Contributed by [@​Half-Shot](https://github.com/Half-Shot). - Room list: avoid header overflowing when too long ([#​32645](element-hq/element-web#32645)). Contributed by [@​florianduros](https://github.com/florianduros). - Room list: center focus outline of room list item ([#​32637](element-hq/element-web#32637)). Contributed by [@​florianduros](https://github.com/florianduros). - Fix misaligned cross in complete security dialog ([#​32614](element-hq/element-web#32614)). Contributed by [@​dbkr](https://github.com/dbkr). - Room list: fix keyboard navigation ([#​32585](element-hq/element-web#32585)). Contributed by [@​florianduros](https://github.com/florianduros). - Don't show empty privacy section ([#​32582](element-hq/element-web#32582)). Contributed by [@​dbkr](https://github.com/dbkr). - Disable room list image dragging ([#​32590](element-hq/element-web#32590)). Contributed by [@​florianduros](https://github.com/florianduros). - Update UserMenu theme toggle to use IconButton ([#​32591](element-hq/element-web#32591)). Contributed by [@​t3chguy](https://github.com/t3chguy). - Room list: make room list item scales with large font size ([#​32523](element-hq/element-web#32523)). Contributed by [@​florianduros](https://github.com/florianduros). </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My41OS4yIiwidXBkYXRlZEluVmVyIjoiNDMuNTkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiYXV0b21lcmdlIiwiaW1hZ2UiXX0=--> Reviewed-on: https://gitea.alexlebens.dev/alexlebens/infrastructure/pulls/4596 Co-authored-by: Renovate Bot <renovate-bot@alexlebens.net> Co-committed-by: Renovate Bot <renovate-bot@alexlebens.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
May fix #32574
Needs #32677 to fix EC tests
Room list item vms are cleared when scrolling:
element-web/apps/web/src/viewmodels/room-list/RoomListViewViewModel.ts
Lines 200 to 218 in 3fb99fe
Before (start at 20sec)
Screen.Recording.2026-02-26.at.18.37.01.mov
After
Untitled.mov