in-document publication-wide search: document caching (plain text and DOM) #1782
danielweck
started this conversation in
Developer corner
Replies: 1 comment
-
Related issue: #1209 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The current implementation prefetches (HTTP requests) all documents in the reading order to populate an in-memory "cache" with plain text data. This occurs at CTRL-F. Then, the actual search is performed on parsed DOM (tree walk with regular expressions, unicode normalization, etc., see #1209 ).
TODO: ensure memory is freed when CTRL-F is closed, but create an on-disc cache so that HTTP requests to the R2 streamer are not necessary. Problem: this breaks LCP copy protection if the files can be found on the filesystem, unencrypted.
Beta Was this translation helpful? Give feedback.
All reactions