[poppler] [patch] improving poppler performance

Albert Astals Cid aacid at kde.org
Thu Sep 9 10:46:16 PDT 2010


A Dijous, 9 de setembre de 2010, JustFillBug va escriure:
> 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?

No

> 
> > 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.

And then you end up in that situation that making your cache smart actually 
slows more your program than the cache gives as speedup.

Albert

> 
> 
> 
> 
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler


More information about the poppler mailing list