summaryrefslogtreecommitdiff
path: root/include/mupdf/fitz/context.h
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-09-19 13:36:56 +0100
committerRobin Watts <robin.watts@artifex.com>2016-09-19 16:49:18 +0100
commit9d430e88deff3e7f0c88ae14edfd0f11331fb53d (patch)
treeffc4700b884ad7247164ae389c61aafe145608df /include/mupdf/fitz/context.h
parente22bf36d2db07a3557588ad7cb2d4ccfccb9679f (diff)
downloadmupdf-9d430e88deff3e7f0c88ae14edfd0f11331fb53d.tar.xz
fz_store: Reap passes.
A few commits back, we introduced the fz_key_storable concept to allow us to cope with objects that were used both as values within the store and as parts of keys within the store. This commit worked, but showed up performance problems; when the store has several million PDF objects in it, bulk changes (such as dropping a display list or document) could trigger many passes across the store. We therefore introduce a mechanism to ameliorate this. These passes, now known as "reap passes", can be batched together using fz_defer_reap_start and fz_defer_reap_end. We trigger this start/end around display list dropping, and around PDF content stream processing. This should be fine, as deferral will be interrupted if we ever run our of memory during mallocing.
Diffstat (limited to 'include/mupdf/fitz/context.h')
-rw-r--r--include/mupdf/fitz/context.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/mupdf/fitz/context.h b/include/mupdf/fitz/context.h
index 50e8eeaa..47aa8fa5 100644
--- a/include/mupdf/fitz/context.h
+++ b/include/mupdf/fitz/context.h
@@ -361,8 +361,8 @@ struct fz_locks_context_s
};
enum {
- FZ_LOCK_ALLOC = 0,
- FZ_LOCK_FILE, /* Unused now */
+ FZ_LOCK_REAP = 0,
+ FZ_LOCK_ALLOC,
FZ_LOCK_FREETYPE,
FZ_LOCK_GLYPHCACHE,
FZ_LOCK_MAX