robrix icon indicating copy to clipboard operation
robrix copied to clipboard

Tracking issue for unnecessary redraws

Open tyreseluo opened this issue 10 months ago • 2 comments

  • [ ] RoomsList widget
    • The current way that updates are applied to the RoomsList widget will trigger a redraw of the entire widget any time a single room changes. Ideally, we should just redraw only the RoomPreview widgets for the rooms that were actually updated.
    • We could even locate the smallest area that should be redrawn. For example: avatar or room_name and other related subwidgets in the room_preview widget.
      • Note from Kevin: it might be slower to figure out the specific items that need redrawing than to just redraw an entire RoomPreview widget.
  • [ ] Audit all calls to SignalToUI::set_ui_signal(), which will cause UI-side refreshes for all widgets that handle Event::Signal.
    • More than likely, most or all of these are correct, but we should look into it just to be sure.
  • [x] When other users are typing, it causes the RoomScreen/Message widgets to constantly redraw.
    • Fixed by a redesign in #421.
  • [x] Message widget can potentially be redrawn on every MouseMove event
    • See https://github.com/project-robius/robrix/issues/331#issuecomment-2609080174
    • Fixed by #357

tyreseluo avatar Jan 26 '25 14:01 tyreseluo

Agreed. As I mentioned separately, let's go ahead and collect all of the unnecessary redraws into a single tracking issue (we can use this one) and add checkboxes for each one.

The Message widget redraw (based on Event::MouseMove) that we previously discussed can also go here. That one is mentioned in issue #331, and I'm actively working on it.

kevinaboos avatar Jan 27 '25 22:01 kevinaboos

I modified the issue accordingly. Feel free to add any more cases that you come across.

kevinaboos avatar Jan 27 '25 22:01 kevinaboos

I think most (if not all) unnecessary redraws have been resolved now.

kevinaboos avatar Sep 24 '25 18:09 kevinaboos