Bug 7910 - Custom memory allocator to improve loading time by ~25%
Custom memory allocator to improve loading time by ~25%
Status: RESOLVED WONTFIX
Product: poppler
Classification: Unclassified
Component: general
unspecified
x86 (IA32) Windows (All)
: high normal
Assigned To: poppler-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-17 22:28 UTC by Krzysztof Kowalczyk
Modified: 2010-02-09 14:57 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
custom memory allocator (19.34 KB, patch)
2006-08-17 22:29 UTC, Krzysztof Kowalczyk
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof Kowalczyk 2006-08-17 22:28:34 UTC
Allocation (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 rahter simple.
Comment 1 Krzysztof Kowalczyk 2006-08-17 22:29:34 UTC
Created attachment 6590 [details] [review]
custom memory allocator
Comment 2 Albert Astals Cid 2010-02-09 14:57:06 UTC
A custom memory allocator is something i don't want to use, there's much more lower hanging fruit out there than a custom memory allocator.