Hello, As I've mentioned previously, memory allocations (malloc()/free() calls) account for a lot of time used by poppler.
Custom memory allocator uses free lists and allocates memory in chunks for the most frequently allocated memory sizes (in my testing about 90% of allocations are served by the 4 sizes covered by the patch). The code is optional and only used when USE_FAST_ALLOC symbol is defined so it can be easily turned on and off. In my testing with this patch loading ~8MB pdf file (PDFReference1.6.pdf available from Adobe website)is speed up by ~25% (this is on top of my previous optimizations; improvement should be even better against current poppler CVS sources). Code is copiously commented and the algorithm used rather simple. The good part is that it hooks things at a very low level so no changes in actual poppler logic was necessary. This is bug https://bugs.freedesktop.org/show_bug.cgi?id=7910 When combined with my other performance patch https://bugs.freedesktop.org/show_bug.cgi?id=7808, the loading time of my test document drops almost in half. I think I can improve this even further by optmizing Lexer::getChar() -- kjk | http://blog.kowalczyk.info _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
