krille-chan / fluffychat

The cutest instant messenger in the [matrix]
https://fluffychat.im/
GNU Affero General Public License v3.0
1.1k stars 192 forks source link

chatlist is laggy, speed a little up #1056

Closed dG94Cg closed 1 month ago

dG94Cg commented 5 months ago

Room.hasNewMessages invoke some heavy CPU function like FromJson (noticed from flutter run -d android --profile, CPU profiler), so using FutureBuilder to wrap it, and the room.isDirectChat will query all rooms which is slow too but it won't change at one render frame so make it as a temporary variable which may help.

ChatListItem still will cost 80ms sometime, hope it will be solve latter.

krille-chan commented 4 months ago

I've now implemented some improvements on my own. @dG94Cg I'm still waiting for your response :-/

github-actions[bot] commented 1 month ago

This pull request was closed because it has been inactive for 14 days since being marked as stale.