Bug 456796

Summary: Lag spike when viewing room info with lots of members
Product: [Applications] NeoChat Reporter: Jan Bidler <janbidler00>
Component: GeneralAssignee: Tobias Fella <fella>
Status: CONFIRMED ---    
Severity: normal CC: carl
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Flatpak   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Jan Bidler 2022-07-16 13:38:00 UTC
SUMMARY
When viewing room/member info in a room with lots of members, there's a visible lag spike and the UI becomes unresponsive.

STEPS TO REPRODUCE
1. Open NeoChat, and visit a room with a lot of members, like #matrix:matrix.org (matrix-HQ)
2. Click on the button to open the sidebar

OBSERVED RESULT
Visible lag spike, UI completely freezes

EXPECTED RESULT
The UI should not freeze. The sidebar should unpop, with a loading bar for the members, should they have not been loaded yet.

SOFTWARE/OS VERSIONS
Linux: Arch Linux
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.5
NeoChat: flatpak, compiled from master
Comment 1 Tobias Fella 2022-11-21 22:18:26 UTC
I can confirm this, but only if i change the neochat's code to disable lazy loading room members. what happens is that while a listview only loads the rows it currently needs, we're using a SortFilterProxyModel, which, as part of sorting, loads every single row and... sorts them... which takes a while for 40.000 members