Re: Low memory hacks
- From: Brian Nitz <Brian Nitz Sun COM>
- To: Behdad Esfahbod <behdad behdad org>
- 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 09:05:31 +0000
Behdad Esfahbod wrote:
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.
Good point. The opens of so many (often unnecessary) font cache files
during every application launch may impact performance if not memory but
that's another topic.
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).
I know it doesn't make sense from a developer's point of view, but it
has been a request for end users, "We don't ever use (X language) fonts
in our Hospital/Bank/University/Government Office, why are we
installing these fonts?" It may be a distribution specific issue, but
it's probably an issue with nearly every distribution.
If a font is installed, it HAS to be noted in the
cache somewhere to be discoverable by apps.
O.K. but opening and mapping these files on every application launch
even when the associated fonts may _never_ be read for a particular user
doesn't seem to be the most efficient thing to do.
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.
Thanks for this information. This will be useful.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]