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 498749 - performance improvement ...
performance improvement ...
Status: RESOLVED FIXED
Product: gnome-menus
Classification: Core
Component: libgnome-menu
2.20.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-menus dummy account
gnome-menus dummy account
Depends on:
Blocks:
 
 
Reported: 2007-11-21 13:40 UTC by Michael Meeks
Modified: 2009-05-21 02:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (6.24 KB, patch)
2007-11-21 13:41 UTC, Michael Meeks
committed Details | Review

Description Michael Meeks 2007-11-21 13:40:24 UTC
It turns out one silly causing slab slowness is just stock desktop thrashing:
calling gmenu_tree_get_root_directory does a huge thrash of work: some N^2 in the number of .desktop files:

It calls 'process_layout' once, which calls 'menu_layout_node_menu_get_app_dirs' 150 times - ~always with the same data; this patch adds a 1 item cache.

My callgrind numbers go from:

3.35 billion (!) instructions beforehand to:
3.08 billion (!) afterwards

only an 8% win it's true, but every cycle helps here I guess :-)
Comment 1 Michael Meeks 2007-11-21 13:41:00 UTC
Created attachment 99438 [details] [review]
patch
Comment 2 Vincent Untz 2009-05-21 02:01:49 UTC
Finally committed ;-)