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 91999 - Icon loading speeed-up
Icon loading speeed-up
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: panel
unspecified
Other Linux
: High enhancement
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2002-08-29 13:47 UTC by Soren Sandmann Pedersen
Modified: 2015-03-24 13:00 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
patch to speed up icon loading (2.41 KB, patch)
2002-08-29 13:54 UTC, Soren Sandmann Pedersen
none Details | Review

Description Soren Sandmann Pedersen 2002-08-29 13:47:29 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.
Comment 1 Soren Sandmann Pedersen 2002-08-29 13:54:39 UTC
Created attachment 10792 [details] [review]
patch to speed up icon loading
Comment 2 Luis Villa 2002-08-30 20:07:39 UTC
Wow, cool! Adding some keywords. Would be nice to get this in on both
branches, of course, but targetting for 2.2 offhand. Mark?
Comment 3 Mark McLoughlin 2002-09-12 03:11:54 UTC
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 ...
Comment 4 Shane O'Connor 2002-10-10 13:56:36 UTC
looks quicker to me - fix verified in suns build11 (cvs oct 1st)
Comment 5 Mattias Dahlberg 2002-10-14 17:42:44 UTC
Committed to HEAD as well?
Comment 6 Mark McLoughlin 2002-10-14 21:59:27 UTC
Yes. Committed on gnome-panel HEAD and gnome-2-0 - "2002-09-12"
Comment 7 Luis Villa 2002-10-25 18:54:19 UTC
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.
Comment 8 Soren Sandmann Pedersen 2002-10-25 19:25:16 UTC
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)