gtk_icon_theme_load_icon very slow



Hello,

I'm developing a PyGTK application [1] which needs to load some icons
from the current theme to show them in a treeview.

The problem is that gtk_icon_theme_load_icon takes about two seconds to
load icons from themes which are not standard [2]. I mean, if the user
use a theme with 256x256 icons, the load of 5 icons (text-x-generic,
audio-x-generic and so on) it's about ten seconds.


The code I'm using to load the icons is, for example:

theme = gtk.icon_theme_get_default()
icon = theme.load_icon("text-x-generic", gtk.ICON_SIZE_MENU, 0)

Which in C should be something like:

theme = gtk_icon_theme_get_default(); 
gtk_icon_theme_load_icon(theme, "text-x-generic", GTK_ICON_SIZE_MENU, 0, NULL);


Code on application is in src/pyrenamer.py [3] on line 1502 aprox.


So what I'm asking is if is there any other way to make this faster?
Thanks in advance!

-- adolfo

[1] http://www.infinicode.org/code/pyrenamer/
[2] bzr branch lp:~ubuntu-new-wave/anton/devel.icon
[3]
http://svn.infinicode.org/index.cgi/pyrenamer/trunk/pyrenamer/src/pyrenamer.py?view=markup


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]