Re: Icon theme index files
- From: Alexander Larsson <alexl redhat com>
- To: Owen Taylor <otaylor redhat com>
- Cc: "gtk-devel-list gnome org" <gtk-devel-list gnome org>
- Subject: Re: Icon theme index files
- Date: 13 Apr 2004 12:13:39 +0200
On Mon, 2004-04-12 at 16:29, Owen Taylor wrote:
> I happened to notice the other day that when you start up GTK+ with
> the Red Hat Bluecurve icon theme, out of the total of 1M of allocated
> memory, about 0.5M is simply icon theme.
>
> Also, as noted earlier, we are doing lots of system call traffic
> on startup to read all this data in.
>
> Here's a proposal to fix these problems: for each icon theme directory
> we keep a binary icon index file which we can simply mmap() and
> use directly.
This all looks very right to me.
I assume we store the files in the toplevel directory of each icon theme
(e.g. in /usr/share/icons/Bluecurve).
How and when do we generate the file? I assume we need to ship gtk+ with
an app that generates such files, and themes have to run this in make
install or %postinstall when you install. What about user-installed
themes in ~/.icons/? Is generating files for these up to the user, or
should gtk+ do it automatically?
The cache up-to-dateness is a bit tricky. If we store the file in the
icon theme directory, then the actual moving of the temp file to the
final name will cause the mtime of the directory to update which might
cause it to have a later mtime than the file. I think we have to do some
utime() magic.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's a time-tossed playboy househusband searching for his wife's true killer.
She's a time-travelling mute archaeologist with a knack for trouble. They
fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]