krille-chan / fluffychat

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

slow ui action cause by chat list item build #1058

Open whereismytee opened 2 months ago

whereismytee commented 2 months ago

Bug Description

when enter chat, the chat list item should not be build, and when it comes to one of it change, it should just rebuild specify one instead of all of it.

Steps to Reproduce

  1. flutter run -d android --profile
  2. join 10 rooms
  3. enter one room
  4. enter flutter profile performance tab
  5. use other app to post messages into 10 rooms one by one
  6. watch the performance tab with frame action above 60ms
  7. watch it timeline

Expected Behavior

expect chat list item don't build after enter chat, it would save 20ms at ui render which ease laggy. expect chat list item only build at it own room change, don't build all, it will help at laggy.

App Version

1.19.2

Additional Platform Information

android, redmi 10

Additional Context

No response