Re: Low memory hacks
- From: Behdad Esfahbod <behdad behdad org>
- To: Brian Nitz <Brian Nitz Sun COM>
- Cc: "Nickolay V. Shmyrev" <nshmyrev yandex ru>, desktop-devel-list gnome org, zuh iki fi
- Subject: Re: Low memory hacks
- Date: Mon, 03 Mar 2008 02:54:51 +0100
On Fri, 2008-02-29 at 13:32 +0000, Brian Nitz wrote:
> For example, launching eog in the "C" locale (Solaris Nevada build
> 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
> 4302 eog -1
> This might make sense for a browser or email client, but if there is
> 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
> 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
] [Thread Prev