Skip to content

Conversation

@BobLd
Copy link
Collaborator

@BobLd BobLd commented Oct 26, 2025

Cache custom CMaps at document level (not shared across documents) in order to avoid re-parsing existing CMap. Also avoid keeping duplicate CMaps in memory.

Custom CMaps with the same name can represent different data. To ensure CMaps are the same before parsing them, we use hashing. MurmurHash3 is used.

This cache is on top of the existing cache for common CMaps (shared across documents).

Note on MurmurHash3:

@BobLd BobLd force-pushed the cmap-caching branch 3 times, most recently from dbaba18 to f0a5bb7 Compare October 26, 2025 15:36
@BobLd BobLd marked this pull request as ready for review October 26, 2025 15:37
@BobLd BobLd merged commit 40bcc22 into UglyToad:master Oct 26, 2025
2 checks passed
@BobLd BobLd deleted the cmap-caching branch October 26, 2025 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant