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

Improve virtual doc caching to handle undefined values #593

Closed
tsandall opened this issue Feb 5, 2018 · 2 comments
Closed

Improve virtual doc caching to handle undefined values #593

tsandall opened this issue Feb 5, 2018 · 2 comments
Assignees

Comments

@tsandall
Copy link
Member

tsandall commented Feb 5, 2018

Currently, if a virtual doc is undefined, that information is not cached during evaluation (whereas if it is defined, the value is cached.) To avoid recomputing the virtual doc and arriving at undefined, evaluation should cache the fact that the doc was undefined.

@tsandall tsandall self-assigned this Feb 6, 2018
@tsandall
Copy link
Member Author

tsandall commented Feb 9, 2018

Closing this for now as it's not needed. We can revisit this in the future if necessary.

@tsandall tsandall closed this as completed Feb 9, 2018
srenatus pushed a commit that referenced this issue Jan 6, 2023
With this change, `undefined` outcomes of complete rule evaluations
are now also cached. Previously, only defined results had been cached,
and empty partial sets/objects.

In the case of partial rules with string keys, the introduction of ref heads
changed how they had been evaluated: Before, they had been evaluated
as partial sets, and thus got cached when empty. After, they had been
evaluated as complete rules (with ref heads), and if they were undefined,
they had _not_ been cached. This caused a performance regression.

Fixes #593.

Signed-off-by: Edward Paget <edward.paget@chime.com>
@srenatus
Copy link
Contributor

srenatus commented Jan 6, 2023

✔️ This has now been implemented, thanks to @edpaget. 🎉

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

No branches or pull requests

2 participants