[poppler] [PATCH] ~10% speedup for loading/parsing a PDF file through simple GooString optimization

Jeff Muizelaar jeff at infidigm.net
Sat Aug 12 13:14:43 PDT 2006

On Mon, Aug 07, 2006 at 11:08:19PM -0700, Krzysztof Kowalczyk wrote:
> In general, it seems that a good strategy for improving poppler
> performance would be to decrease the number of malloc()/free() calls
> e.g. by stack-allocation of objects as opposed to constantly
> new/delete them. Even after this optimization malloc()/free() are at
> the top of profile.

Nice work. This optimization approach seems like a decent general
solution. I think we should probably apply the cleaned up version unless
anybody has some objections.

It would be interesting to see where the majority of the allocations are
happening as well as what we are actually doing with the strings. It
might be worth adding an immutable string type that is always a single
allocation regardless of it's length.


More information about the poppler mailing list