[poppler] Even more speedups
Krzysztof Kowalczyk
kkowalczyk at gmail.com
Sun Sep 3 13:26:36 PDT 2006
- Previous message: [poppler] poppler/poppler: Dict.cc, 1.4, 1.5 Dict.h, 1.3,
1.4 Object.h, 1.2, 1.3 Parser.cc, 1.5, 1.6
- Next message: [poppler] poppler/poppler: CairoOutputDev.cc,1.40,1.41
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Hello,
I've made another performance tweak:
https://bugs.freedesktop.org/show_bug.cgi?id=8115
Currently poppler free()s/malloc()s strings a lot. Many of those
re-allocations are done for strings in Object class. I've improved
that by a simple custom allocator that caches N recently free()d
strings and satisfies alloc()s from that cache, avoiding
free()/malloc() cycle. In my tests the cache is very effective: even a
small cache (16 strings) can satisfy >99% of all allocations
requests.
It also changes Object::name and Object::cmd to use GooString *
instead of char *, so that they can benefit from the cache.
It also tweaks GooString and UGooString a bit and fixes a UGooString
bug where re-allocation would only preserve half of the string
(probably introduced by me earlier).
In my tests I get 2-10% speedup on loading PDF, 4% being the most common.
-- kjk
Sumatra (PDF Viewer for Windows):
http://blog.kowalczyk.info/software/sumatrapdf
- Previous message: [poppler] poppler/poppler: Dict.cc, 1.4, 1.5 Dict.h, 1.3,
1.4 Object.h, 1.2, 1.3 Parser.cc, 1.5, 1.6
- Next message: [poppler] poppler/poppler: CairoOutputDev.cc,1.40,1.41
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the poppler
mailing list