Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why are the style objects not cached? #43

Open
nicolasfranck opened this issue Jan 18, 2022 · 0 comments
Open

Why are the style objects not cached? #43

nicolasfranck opened this issue Jan 18, 2022 · 0 comments

Comments

@nicolasfranck
Copy link

The current version does not cache the parsed csl style objects
but loads them on every request.

This is due to the following reasons:

  • NoncacheEngineCache is used. That implementation loads the style object from disk (See here and here).
  • It is possible to use QueueCache, but that implementation has possible data racing issues, not? I see that every "engine" has attributes like "working" (because it stores data about the thing it is working on), and that the engine is "reset" before returning it to the cache. So if parallel requests come in, the same engine is used. Even this line does not really solve the issue.

Why not simply cache the parsed style objects (which are immutable)? Those are the slowest to load.
In that case there is no need for an engine cache, as that complicates matters.

In short: the caching is done at the wrong place?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant