GNOME Bugzilla – Bug 91999
Icon loading speeed-up
Last modified: 2015-03-24 13:00:35 UTC
Icon loading for the panel menus currently takes place in an idle handler that calls gtk_image_set_...() for each loaded image. Setting this image results in the size allocation for the menu to be renegotiated, and since gtk does size negotiation in an idle handler with a higher priority than icon loading, this means that the entire size allocation is renegotiated for each loaded icon. Profiling shows that a significant amount of time is spent on this. The soon-to-be-attached patch changes icon loading so that instead of directly calling gtk_image_set_...(), it queues up the image setting and does all of the gtk_image_set_...() when all the icons have been loaded, avoiding all the extra size negotiations. The result is noticably, though not dramatically, faster on my machine.
Created attachment 10792 [details] [review] patch to speed up icon loading
Wow, cool! Adding some keywords. Would be nice to get this in on both branches, of course, but targetting for 2.2 offhand. Mark?
Thanks for putting in the effort to nail this down Soeren :-) I've committed the patch and fixed a small problem where a copy of the stock id was getting freed before we used it ...
looks quicker to me - fix verified in suns build11 (cvs oct 1st)
Committed to HEAD as well?
Yes. Committed on gnome-panel HEAD and gnome-2-0 - "2002-09-12"
Mark: AFAICT, you didn't in fact commit to HEAD- it's not in the ChangeLog at http://cvs.gnome.org/lxr/source/gnome-panel/ChangeLog , and the panels on my HEAD build are still pretty icky slow. Can you check, please? Thanks.
It is in http://cvs.gnome.org/lxr/source/gnome-panel/gnome-panel/ChangeLog You may be seeing the effect of a recent change to gtk's menus. In that case, the slowdown is a feature, not a bug (submenu popup is now delayed by 225 ms by default)