After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 633178 - combo box very slow on gtk3
combo box very slow on gtk3
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkComboBox
3.2.x
Other All
: Normal major
: ---
Assigned To: gtk-bugs
gtk-bugs
EL
: 650858 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-10-26 11:54 UTC by Christian Persch
Modified: 2018-03-23 18:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screencast of the gucharmap combo box with gtk 3.10 (121.64 KB, video/webm)
2013-10-02 10:24 UTC, Emmanuele Bassi (:ebassi)
Details

Description Christian Persch 2010-10-26 11:54:32 UTC
Steps to repro:
0) Build gucharmap --with-gtk=3.0
1) Install every font package your distro has
2) Start gucharmap, and click on the font combo box to pop it up
3) Select and item, to pop the combo box down

Actual results:
Step 2) takes a very long time; and after step 3) it takes a long time until the programme is responsive again.

Expected results:
Steps 2) and 3) are pretty much instantaneous, even though the font list is very large.

This works as expected on a gtk2 gucharmap build (--with-gtk=2.0), so this is clearly a gtk3 regression.
Comment 1 Christian Persch 2010-10-27 14:16:15 UTC
Slowness in 3) even happens when popping down the combo box without selecting anything (e.g. by pressing Escape key). In this case, no new font is selected, so any slowness of redrawing isn't due to gucharmap switching to a new font.
Comment 2 Matthias Clasen 2010-10-31 20:03:25 UTC
Seems to be fallout from the popup width changes, at least, it is stuck in size allocation.
Comment 3 Christian Persch 2011-01-18 14:06:20 UTC
The slowness of popping up the combo is still reproducible using gtk+ master from today. (Popping is down again, while still a bit slow, isn't nearly as bad now.)
Comment 4 Javier Jardón (IRC: jjardon) 2011-04-03 16:05:31 UTC
Confirmed in GTK+ 3.0.6 and epiphnay browser (simply try to change the product field below)
Comment 5 Guillaume Desmottes 2011-05-23 12:56:42 UTC
*** Bug 650858 has been marked as a duplicate of this bug. ***
Comment 6 Guillaume Desmottes 2011-05-23 12:57:36 UTC
Same problem with Empathy's protocol chooser (see bug #650858).
Note that we don't observe this regression when removing the pixbuf renderer displaying the protocol icon.
Comment 7 Jean-François Fortin Tam 2011-05-23 16:48:41 UTC
Whew, looks like I was not imagining things. Was wondering if it was by design (ie: lazy loading the combobox items).


If this is the result of lazily loading the contents, I was thinking maybe it would be possible to pre-load it when the mouse cursor is over the combobox widget (or not paint the thing until it is actually loaded)
Comment 8 Guillaume Desmottes 2011-06-01 08:31:56 UTC
We solved this in Empathy by rendering the pixbuf directly; see http://git.gnome.org/browse/empathy/commit/?id=b0bd73cfa5658971f12c86a1f3711cab663a3f40
Comment 9 Milan Bouchet-Valat 2011-06-01 08:57:50 UTC
But that's not very practical (more work for the same result), and I suspect you'd need to listen to theme changes if you want to be completely correct...
Comment 10 Christian Persch 2011-09-27 21:01:20 UTC
Still reproducible with gucharmap on gtk 3.2.0. Gucharmap just uses a text combo, it has no pixbuf/icons/etc in the combo.
Comment 11 Timothy Arceri 2013-10-01 22:34:49 UTC
Bump. Is combobox still slow in 3.10?
Comment 12 Christian Persch 2013-10-01 23:02:09 UTC
It's not as bad as it used to be, but the font combo in gucharmap still takes 2-3 seconds to pop up.
Comment 13 Emmanuele Bassi (:ebassi) 2013-10-02 10:23:57 UTC
(In reply to comment #12)
> It's not as bad as it used to be, but the font combo in gucharmap still takes
> 2-3 seconds to pop up.

the combo box in gucharmap on a stock fedora 20 installation is nearly instantaneous.
Comment 14 Emmanuele Bassi (:ebassi) 2013-10-02 10:24:36 UTC
Created attachment 256246 [details]
screencast of the gucharmap combo box with gtk 3.10
Comment 15 Emmanuele Bassi (:ebassi) 2013-10-02 10:26:03 UTC
it would be good to have a profiling trace to see what's the ComboBox doing on pop down.
Comment 16 Christian Persch 2013-10-02 11:05:51 UTC
How many fonts do you have installed?

$ fc-list | wc -l
654
Comment 17 Emmanuele Bassi (:ebassi) 2013-10-02 11:14:34 UTC
definitely not as many :-) around 150 fonts installed (again: it's pretty much a stock f20 installation)

if it's happening on pop down then it may mean that we're doing too much work on hide/destroy, like invalidating styles/renderers for stuff that won't be displayed.
Comment 18 Daniel Boles 2018-01-14 12:06:10 UTC
How is this in 3.22?
Comment 19 Christian Persch 2018-03-23 17:39:41 UTC
Still not instantaneous, just slow enought for the delay from click to pop up to be noticeable (about half a second), but bearable.
Comment 20 Daniel Boles 2018-03-23 18:34:08 UTC
Thanks for the update! I guess we might as well close this, then; changes that would affect it in GTK+ 3 are very unlikely at this point, whereas GTK+ 4 is an entirely different kettle of fish as discussed at https://gitlab.gnome.org/GNOME/gtk/issues/55 and https://gitlab.gnome.org/GNOME/gtk/issues/80