GNOME Bugzilla – Bug 498749
performance improvement ...
Last modified: 2009-05-21 02:01:49 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 :-)
Created attachment 99438 [details] [review] patch
Finally committed ;-)