freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Regarding GTK/GNOME memory usage optimization


From: Ian Britten
Subject: Re: [ft-devel] Regarding GTK/GNOME memory usage optimization
Date: Thu, 03 Mar 2005 09:18:04 -0400
User-agent: Mozilla Thunderbird 0.5 (X11/20040229)

Turner, David wrote:
Hello everyone,


The only place that Pango isn't using the public APIs is the much
discussed OpenType code.


Fine, I think I'll be able to provide you with a patch rather easily
next week then..


Fontconfig does seem to be using some FreeType internal API for
things like BDF files. I don't really know the details there.


I'll have a look at fontconfig later. However, I don't expect typical
users to install BDF fonts. It's rather PCF, especially compressed
ones which are such a waste of resources when embedding the bitmaps
in a TrueType file provides both drastic performance, memory and
file size improvements.

By the way, where is the tool used to create these fonts. I believe
that Juliusz wrote it and that it's now part of the X.org distribution,
but I'd like to get a hand on its source code ?


Thanks a lot for looking into the memory usage situation....
I'd say in general FreeType right now is fairly low on my memory
usage radar ... profiles I've looked at is that apps do tend to have non-trivial amount of non-shared memory allocated by FreeType,
but using 50 or 80k of memory for loading fonts doesn't seem
excessive to me compared to how we are using memory elsewhere.

I haven't looked at the situation for CJK or all-Unicode fonts.
It's possible that dynamic allocation from FreeType is more of
a problem there.



I've nearly completed the optimization. The results are described
in my latest Advogato diary entry (dated March 2nd). Have a look
at:

   http://www.advogato.org/person/freetype/
I'd be interested if one of you had a clear way to measure the global
improvement on a typical Gnome or KDE desktop.

[ Although I'm guessing you're probably aware of this, I figured I'd
 point it out, just to make sure... ]

If you're on Linux, I'd suggest looking at Massif, part of the Valgrind
suite:
        http://developer.kde.org/~sewardj/docs-2.2.0/ms_main.html
        http://valgrind.kde.org/tools.html

"Massif is a heap profiler. It performs detailed heap profiling by
 taking regular snapshots of a program's heap. It produces a graph
 showing heap usage over time, including information about which parts
 of the program are responsible for the most memory allocations. The
 graph is supplemented by a text or HTML file that includes more
 information for determining where the most memory is being allocated.
 Massif runs programs about 20x slower than normal. Massif was
 introduced in version 2.1.1 of Valgrind."

Although it is very new (ie It's still kindof raw), it seem to work
well, and I've used it numerous times, but usually in small, focused
test programs, where you want to examine a couple of discrete facets of
your program.  I couldn't imaging trying to profile the entire KDE/GNOME
desktop at once... (YMMV though...)

[ And it's free!  :-> ]

Ian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]