-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Caching would significantly speed up regeneration of documents with many figures, as the figures would be reused between runs.
Goals:
- Cache generated figures in a pre-configured directory
- Determine which figures were generated by the same source, and reuse the generated assets
- Caching - Delete old, long unused figures from cache, when configured to do so #39 Add some way of automated cache flushing/deletion of unused figures
Implementation ideas:
- Store the cached files as
${hash of absolute path}_${hash of figure source code}.cachein the cache directory- As of Added basic caching, moved most debug-level println's to loggers. #38, files are stored as
${hash of figure source code}.cacheonly
- As of Added basic caching, moved most debug-level println's to loggers. #38, files are stored as
- Read and parse all such file names into memory on startup, and also the files' modification dates
- As of Added basic caching, moved most debug-level println's to loggers. #38, files are not listed into memory on startup, but are queried nly when needed
- Lookup and compare by
${hash of figure source code}during a render- Currently implemented, as of Added basic caching, moved most debug-level println's to loggers. #38
- If automated cache deletion has been enabled (to be implemented in Caching - Delete old, long unused figures from cache, when configured to do so #39):
- Delete cached items if they weren't used during the last run, and their TTL hasn't ran out
- TTL - users may revert back to older versions while they're editing, but it seems unlikely such a thing would happen after some period of development, when the user would focus on other parts of the document. Old development versions of these files may be removed again.
- Delete cached items if they weren't used during the last run, and their TTL hasn't ran out
- Default
.spacedoc/cachedirectory should probably be in the directory currently being ran from - Configurability:
- Whether to actually use cache at all
- Default cache directory
- Whether to ever delete cache items for unused files
- What maximum TTL should cached items have
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request