Provides an in-memory cache initializable from file - #147
Draft
hlapp wants to merge 3 commits into
Draft
Conversation
The main motivation for now is to help speed up computing term weights for some of the corpora, in particular taxon_annotations, but it is designed not to be specific to that case in any way. Be default the cache will behave as an in-memory cache, i.e., starting as an empty cache when the R session is started. Optionally it can, however, be initialized with a precomputed cache, which would normally be obtained by serializing the cache after the calculations or queries meant to be cached have been run.
The annotations count function is currently only used for the "taxon_annotations" corpus. This cache uses a persistent file for initializing, the corpus size cache is only in memory.
This change should achieve compatibility with "Staged Installation", see https://developer.r-project.org/Blog/public/2019/02/14/staged-install/
hlapp
force-pushed
the
persistent-cache
branch
from
February 2, 2021 23:48
90d7956 to
a95d9f8
Compare
hlapp
marked this pull request as draft
February 3, 2021 19:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The main motivation for now is to help speed up computing term weights for some of the corpora, in particular taxon_annotations, but it is designed not to be specific to that case in any way.
Be default the cache will behave as an in-memory cache, i.e., starting as an empty cache when the R session is started. Optionally it can, however, be initialized with a precomputed cache, which would normally be obtained by serializing the cache after the calculations or queries meant
to be cached have been run.