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

internal/eval: remove the inCache #45

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

patjakdev
Copy link
Collaborator

Issue #, if available: None

Description of changes:

We don't currently have a benchmark that's telling us that we need this cache. In fact, several of our benchmarks show that for large, shallow entity graphs, the inCache actually slows down authorizations and batch evaluations because of all the extra allocation that goes on to build the map.

For deep entity graphs, such a cache might be useful, but I think instead that we'll try to put such a cache in the entity graph itself by keeping track of the transitive closure of every entity's parents. That way, the cache will be effective across multiple authorizations.

We don't currently have a benchmark that's telling us that we need this cache. In fact, several of our benchmarks show that for large, shallow entity graphs, the inCache actually slows down authorizations and batch evaluations because of all the extra allocation that goes on to build the map.

For deep entity graphs, such a cache might be useful, but I think instead that we'll try to put such a cache in the entity graph itself by keeping track of the transitive closure of every entity's parents. That way, the cache will be effective across multiple authorizations.

Signed-off-by: Patrick Jakubowski <[email protected]>
@patjakdev patjakdev marked this pull request as ready for review October 1, 2024 17:43
@patjakdev patjakdev requested review from philhassey and apg October 1, 2024 17:43
authorize.go Show resolved Hide resolved
@patjakdev patjakdev merged commit ca4de8d into cedar-policy:main Oct 1, 2024
3 checks passed
@patjakdev patjakdev deleted the remove-incache branch October 1, 2024 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants