summaryrefslogtreecommitdiff
path: root/include/mupdf/pdf/xref.h
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2014-12-29 19:07:48 +0000
committerRobin Watts <robin.watts@artifex.com>2014-12-29 19:10:46 +0000
commit319c9d2315ad4fb13abe423571311ddb63202e2c (patch)
tree803e5a6cd31e500add8ec0bb8236277267a731a9 /include/mupdf/pdf/xref.h
parent7209f8811b61007f999afcb78d4440a805d853f4 (diff)
downloadmupdf-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/mupdf/pdf/xref.h')
-rw-r--r--include/mupdf/pdf/xref.h2
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);