Re: accessing stock icons during startup
- From: Matthias Clasen <mclasen redhat com>
- To: "Padraig O'Briain" <Padraig Obriain Sun COM>
- Cc: performance-list gnome org, gtk-devel-list gnome org
- Subject: Re: accessing stock icons during startup
- Date: Fri, 04 Nov 2005 12:23:45 -0500
On Fri, 2005-11-04 at 17:12 +0000, Padraig O'Briain wrote:
> While looking at gnome-panel startup in GNOME 2.12 on Solaris I noticed
> that about 110 ms was being used in gtk_style_init() when created the
> first widget, the panel toplevel. This may not sound like a lot but I
> have noticed that the same thing seems to occur in the 11 processes
> listed below which start during GNOME startup:
>
> gnome-settings-daemon
> gnome-session
> metacity
> gnome-panel
> nautilus
> wnck-applet
> gnome-volcheck
> clock-applet
> notification-area-applet
> gnome-netstatus-applet
> mixer_applet2
>
> A lot of this time is spent accessing or attempting to access stock
> icons. Snippet of Solaris truss file below. You should see similar on
> linux by running strace on the startup of a GNOME program.
>
> 475/1: 22.6064
> access("/usr/share/icons/blueprint/stock/16x16/stock_apply_20.png",
> F_OK) Err#2 ENOENT
> 475/1: 22.6066
> access("/usr/share/icons/blueprint/stock/20x20/stock_apply_20.png",
> F_OK) = 0
> 475/1: 22.6068
> access("/usr/share/icons/blueprint/stock/16x16/stock_cancel_20.png",
> F_OK) Err#2 ENOENT
> 475/1: 22.6069
> access("/usr/share/icons/blueprint/stock/20x20/stock_cancel_20.png",
> F_OK) = 0
> 475/1: 22.6071
> access("/usr/share/icons/blueprint/stock/16x16/stock_cdrom_16.png",
> F_OK) = 0
> 475/1: 22.6074
> access("/usr/share/icons/blueprint/stock/16x16/stock_cdrom_24.png",
> F_OK) Err#2 ENOENT
> 475/1: 22.6075
> access("/usr/share/icons/blueprint/stock/20x20/stock_cdrom_24.png",
> F_OK) Err#2 ENOENT
>
>
> The stack trace for the access call gives some idea of what code is
> being executed:
>
> libc.so.1`access+0x4
> libgtk-x11-2.0.so.0.800.6`gtk_rc_check_pixmap_dir+0x18
> libgtk-x11-2.0.so.0.800.6`gtk_rc_find_pixmap_in_path+0x34
> libgtk-x11-2.0.so.0.800.6`gtk_rc_parse_icon_source+0x94
> libgtk-x11-2.0.so.0.800.6`gtk_rc_parse_stock+0xb4
> libgtk-x11-2.0.so.0.800.6`gtk_rc_parse_style+0x568
> libgtk-x11-2.0.so.0.800.6`gtk_rc_parse_any+0x130
> libgtk-x11-2.0.so.0.800.6`gtk_rc_context_parse_one_file+0x148
> libgtk-x11-2.0.so.0.800.6`gtk_rc_context_parse_file+0xfc
> libgtk-x11-2.0.so.0.800.6`parse_include_file+0xc0
> libgtk-x11-2.0.so.0.800.6`gtk_rc_parse_statement+0x8c
> libgtk-x11-2.0.so.0.800.6`gtk_rc_parse_any+0x130
> libgtk-x11-2.0.so.0.800.6`gtk_rc_context_parse_one_file+0x148
> libgtk-x11-2.0.so.0.800.6`gtk_rc_context_parse_file+0xfc
> libgtk-x11-2.0.so.0.800.6`gtk_rc_parse_named+0x124
> libgtk-x11-2.0.so.0.800.6`gtk_rc_reparse_all_for_settings+0x228
> libgtk-x11-2.0.so.0.800.6`gtk_settings_get_for_screen+0xcc
> libgtk-x11-2.0.so.0.800.6`gtk_style_init+0x14
> libgobject-2.0.so.0.800.3`g_type_create_instance+0x268
> libgobject-2.0.so.0.800.3`g_object_constructor+0x18
>
> Lorenzo's document,http://www.gnome.org/~lcolitti/gnome-startup/analysis/,
> refers to an icon cache.
>
> Is the icon cache in GNOME 2.12 and is it supposed to address this problem?
>
> Padraig
The icon cache is in 2.12, but what you are seeing here is not covered
by it. This looks like gtk theme which reassigns a lot of stock icons in
its gtkrc file, like this:
stock["gnome-stock-about"] = {{ "stock_about.png" }}
stock["gnome-stock-volume"] = {{ "stock_volume.png" }}
stock["gnome-stock-mic"] = {{ "stock_mic.png" }}
Can you show us the gtkrc file thats being used here ?
Matthias
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]