scalable icons vs icon caching



Scalable (svg) icons seem to become more and more the norm
in our icon themes. While this is nice in principle, it seriously
defeats the icon caching in GTK+. For raster icons (png or xpm),
the mmapped icon cache allows all apps to share the pixel data,
and keep only a single copy of it in memory. But svg icons have
to be rendered at the size the application requests, and thus
every application has one (or possibly) multiple copies of the
rendered icon in memory.

I'm currently considering to make gtk-update-icon-cache store
pre-rendered versions of svg icons in common sizes in the
icon caches. This would have the negative effect of making
icon caches somewhat larger. But it would allow apps to share
the pixel data again, and we avoid rendering the same svgs
over and over in every application.

Comments ?

Matthias



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