freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] loading and rendering time


From: David Turner
Subject: Re: [Freetype] loading and rendering time
Date: Thu, 11 Apr 2002 17:08:11 +0200

Hello Nir,

Nir Rostoker a écrit :
> 
> Hi !
> 
> I have done some tests to find out how long some actions in FreeType take.
> 1. Working with the same font I have measured the time of loading and then
> rendering a Glyph both when the font was from ROM (using FT_New_Memory_Face)
> and both
>     when the font was from a file. I haven't noticed time difference, even
> though I had expected that using a file would take much longer.
>     Is it due to a smart algorithm that read chunks from the file ? does
> anyone can explain this ?
>
Several things can explain that:

  - you're using buffered file streams without knowing it (e.g. ANSI FILE*
    objects)

  - reading glyph data isn't that processor intensive. Doing all the
    hinting and rendering is much more important

note that when using ROM or memory-mapped file, FreeType will use less
heap memory for its objects (though this is not always significant).
 
> 2. Moreover, I changed the size of the raster pool (from its default  size
> to a size very near to its minimal limit - around 4.5-5KBytes), I haven't
> noticed a difference in the
>     rendering time, even though I have expected it to be significantly
> slower.
>
Benchmarks are very sensitive to their input. Have you tried rendering
all glyphs of a CJK font at a glyph size of 64 pixels. I doubt that the
performance will stay the same here since it's not rare to find glyphs
with more than 200 points (and _lots_ of beziers too) within these..

These really stress the rasterizers, unlike latin fonts which are much
more civilized in this respect :-)


The default raster pool settings are conservative to avoid surprises
to ordinary users. Feel free to reduce its size if it fits your own
restrictions..



Hope this helps,

- David



reply via email to

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