diff options
author | Robin Watts <robin.watts@artifex.com> | 2014-12-29 19:07:48 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2014-12-29 19:10:46 +0000 |
commit | 319c9d2315ad4fb13abe423571311ddb63202e2c (patch) | |
tree | 803e5a6cd31e500add8ec0bb8236277267a731a9 /include | |
parent | 7209f8811b61007f999afcb78d4440a805d853f4 (diff) | |
download | mupdf-319c9d2315ad4fb13abe423571311ddb63202e2c.tar.xz |
Performance optimisation with pdf_cache_object/pdf_get_xref_entry
The recent change to holding pdf xrefs in a sparse format has resulted
in a significant decrease in speed (x10). Malc points out that some of
this (2x) can be recovered simply by making pdf_cache_object return the
entry which it found the object in.
This saves us having to immediately call pdf_get_xref_entry again
afterwards.
I am still thinking about ways to try and get the remaining time back.
Diffstat (limited to 'include')
-rw-r--r-- | include/mupdf/pdf/xref.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/mupdf/pdf/xref.h b/include/mupdf/pdf/xref.h index 70826314..ac8525ac 100644 --- a/include/mupdf/pdf/xref.h +++ b/include/mupdf/pdf/xref.h @@ -66,7 +66,7 @@ struct pdf_xref_s pdf_obj *pre_repair_trailer; }; -void pdf_cache_object(pdf_document *doc, int num, int gen); +pdf_xref_entry *pdf_cache_object(pdf_document *doc, int num, int gen); int pdf_count_objects(pdf_document *doc); pdf_obj *pdf_resolve_indirect(pdf_obj *ref); |