Re: Low memory hacks

On Fri, 2008-02-29 at 13:32 +0000, Brian Nitz wrote:
> For example, launching eog in the "C" locale (Solaris Nevada build
> 82, 
> GNOME 2.20.2)  opens font files for many other locales.  These may be 
> mapped into physical memory at times, regardless of your locale. :
>   4302 eog           18 
> /usr/openwin/lib/locale/zh/X11/fonts/TrueType//fonts.cache-1
>   4302 eog           -1 
> /usr/openwin/lib/locale/zh_CN.GB18030/X11/fonts/75dpi//fonts.cache-1
> This might make sense for a browser or email client, but if there is
> a 
> performance and memory impact, it would be nice to have the option to 
> disable loading of fonts from other locales.  Some GNOME users are 
> running on thin client kiosks on isolated networks (banks...) where
> they 
> are unlikely to need all of these fonts.

This makes zero sense.  First, those are caches, not actual fonts.
Second, they are mapped into the address space readonly, not "read", so
they don't consume per-process memory.  Third, there's no such thing as
locale-specific fonts.  If a font happens to cover Chinese only, so be
it.  Finally, if you don't need those fonts, simply don't install them
(or uninstall them).  If a font is installed, it HAS to be noted in the
cache somewhere to be discoverable by apps.

Ok, now looking at your list again, you are running an old version of
fontconfig that does in fact read those caches into memory for each
process.  Use a newer fontconfig, and that would save you some 100k per
process, or more.


"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759

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