[Poppler-bugs] [Bug 8112] New: ~7% speedup for pdf loading by
removing memory copies
bugzilla-daemon at annarchy.freedesktop.org
bugzilla-daemon at annarchy.freedesktop.org
Sat Sep 2 17:14:12 PDT 2006
Please do not reply to this email: if you want to comment on the bug, go to
the URL shown below and enter yourcomments there.
https://bugs.freedesktop.org/show_bug.cgi?id=8112
Summary: ~7% speedup for pdf loading by removing memory copies
Product: poppler
Version: unspecified
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: general
AssignedTo: poppler-bugs at lists.freedesktop.org
ReportedBy: kkowalczyk at gmail.com
Currently during Parser::getObj() and when adding values to dictionaries poppler
makes unnecessary copies of objects. When objects are strings, this means
reallocating memory. Since Parser::getObj() is called (literally) in N*100k
times, those memory allocations contribute significantly to the execution time
(e.g. delete is 4th most expensive function).
The attached patch makes really only two small changes:
a) avoid memory copy by giving the caller an ownership of the object and nulling
the object in one code path
b) optimizing UGooString usage of key variable (it was always constructed but is
not always needed)
Also adds helper Dict::add* functions to make b) (and maybe other future changes
like that) possible.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Poppler-bugs
mailing list