[poppler] [patch] improving poppler performance

JustFillBug mozbugbox at yahoo.com.au
Wed Sep 8 23:59:59 PDT 2010

On 2010-09-05, Albert Astals Cid <aacid at kde.org> wrote:
> A Dilluns, 23 d'agost de 2010, Pawe?? Wiejacha va escriure:
>> Hi, 05_bigger_glyph_pixmap_cache.patch Previously glyph cache hit
>> rate was about 10-20%. Increasing its size 6 times (up to 1.5 MB
>> additional memory) results in 30-60% hit rate and 3-12% performance
>> increase.
> I've commited a different approach for this that should almost not
> increase memory usage.
> My approach is increasing the cache size only for small fonts (those
> with glyphsize < 128 or < 64)
> My reasoning here is that if the fonts are big the will not be lots of
> them in the same page (because they won't fit) thus the improvement
> given by increasing the cache size won't be much in absolute time,
> that is, all the pdf i have with "just text" on the page, render in
> 60ms, increasing the cache size will give us a some speed increase,
> but 60ms is "fast enough".

Is the font cache page based?

> The only "very font intensive" pdf i have found in my collection is
> the firefox nytimes advertisement that has a HUGE amount of small
> text, thus my change makes it go from 1500ms to 1250ms.

Another aproach is to dynamically adjust cache size by keeping track of
the cache hit rate. Start from a small cache size, increase the cache
size if the hit rate is less than, say 60% until a preset memory size
limit is hit.

More information about the poppler mailing list