Bug 7910 - Custom memory allocator to improve loading time by ~25%
Summary: Custom memory allocator to improve loading time by ~25%
Status: RESOLVED WONTFIX
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Windows (All)
: high normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
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

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.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.