gtk-update-icon-cache not run
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | gtk+2.0 (Ubuntu) |
Medium
|
Ubuntu Desktop Bugs | ||
Bug Description
gtk-update-
nautilus (and some other programs) allocate 300kb or more of memory on startup
that could be saved. Also, large amounts of disk IO are required to look at icons.
| Sebastien Bacher (seb128) wrote : | #1 |
| Ben Maurer (bmaurer) wrote : | #2 |
"This caching can make it impossible for users to add icons without having to
restart applications. In order to handle this, any implementation that does
caching is required to look at the mtime of the toplevel icon directories when
doing a cache lookup, unless it already did so less than 5 seconds ago. This
means that any icon editor or theme installation program need only to change the
mtime of the the toplevel directory where it changed the theme to make sure that
the new icons will eventually get used."
http://
gives a correct example of the impl of the spec in an rpm format:
%post
touch --no-create %{_datadir}
if [ -x /usr/bin/
gtk-update-
fi
Given the huge benefit, it seems worth a small audit to get this correct.
| Sebastien Bacher (seb128) wrote : | #3 |
Thanks for the followup.
The issue is not the audit, it's to rebuild hundreds (thousands?) of packages to
use this hack. We started this discussion with Debian/GNOME maintainer some time
ago but stopped because changing this number of package before Sarge was not an
option.
I'll ping them again about this, but from the previous discussion some of them
where not really happy of the way how the cache works, they would prefer to look
on the mtime of all the subdirs (which should be quite fast too and robust).
| Ben Maurer (bmaurer) wrote : | #4 |
Has a list of pacakges that install stuff into /usr/share/
copied and pasted the list into a text editor and did:
[benm@omega benm]$ cat icons-list | awk '{ print $2 }' | sort | uniq | wc -l
138
| Sebastien Bacher (seb128) wrote : | #5 |
right, that's only for hicolor but most of icon are here. That's a bunch of
package but should not be an issue, I'll talk to Debian guy and start working on
that next week, thanks for your attention on the issue.
| Daniel Holbach (dholbach) wrote : | #6 |
That was for hoary, for Dapper it is: 346
| Athurva Gore (agore187) wrote : | #7 |
Does anyone know what the status of this bug is? From what I understand, this would fix the loading times of icons in a lot of menus, speeding up a lot of older computers by a lot...
| Daniel Holbach (dholbach) wrote : | #8 |
For Dapper and 'GNOME' it's: 10
i agree with some that comment that the cache specification is broken.
there is an alternative to patching the 300+ packages: patch the cache to:
1. retry on the filesystem if the icon wasn't found in the cache (as sebastien bacher suggested on planet gnome)
2. check recursively the mtime to decide whether the cache is outdated
so that's the alternative for ubuntu & debian: patch the cache instead of disabling it, even if upstream disagrees. 1 package to change instead of 300+ and of course rebuild applications to use the cache, which would be needed anyway.
of course that risks some bad mood & bad comments from upstream...
| Daniel Holbach (dholbach) wrote : | #10 |
For GNOME and hicolor, it's: 205 source packages, 60 in main.
| Sebastien Bacher (seb128) wrote : | #11 |
Transition has been made, that bug is fixed with dapper
| Changed in gtk+2.0: | |
| assignee: | seb128 → desktop-bugs |
| status: | Confirmed → Fix Released |


this is not a bug, the cache works by folder and is updated by the theme when
they are installed.
With the current cache implementation it's not easy to make a cache for hicolor icons/hicolor icons/hicolor/ 48x48/apps/ , the mtime for icons/hicolor is not updated
by example, for this reason:
- you do a cache for /usr/share/
- gtk compares the cache and the directory mtimes to know if the cache is outdated
- if it's not outdated it uses the cache
- now you install an icon to /usr/share/
/usr/share/
- the cache masks this new icon
Basically the cache to work would require to patch every single package
installing an icon to update the directory too which is not the case at the moment.