Scrolling performance regression
The refactor of message icons (06700c96) causes massive performance loss when scrolling through large amount of messages.
Context: active groupchat with ~1500 messages/day. After around a day, scrolling becomes sluggish, after a few days I need to slow very slowly in order to prevent multi-second hangs.
With git bisect identifying 06700c96 as the problematic commit, I also attached perf(1)
while scrolling. This showed that most of the time is spent in gtk_widget_size_allocate
. This function is called by gtk_text_view_value_changed
for each child object of the textview. (https://gitlab.gnome.org/GNOME/gtk/blob/f737908d2f7dc121e0d85507c16fd7a399d4b36a/gtk/gtktextview.c#L9014) As for each line there's a MessageIcons
object, this probably results in a few thousandth calls to gtk_widget_size_allocate
for each scroll operation in my case.
Versions
- OS: Arch-Linux
- Gajim version: master (713a95fb)
- GTK version: 3.24.13
- Python-nbxmpp version: master (python-nbxmpp@dc337d8c)