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

Smart caching for input->AST conversion in the engine. #163

Closed
charithe opened this issue Jun 21, 2021 · 1 comment
Closed

Smart caching for input->AST conversion in the engine. #163

charithe opened this issue Jun 21, 2021 · 1 comment

Comments

@charithe
Copy link
Contributor

charithe commented Jun 21, 2021

One of the hotspots in the engine is the toAST function which converts the incoming request into a Rego AST for processing. With real life usage, it is very likely that the incoming requests will contain the same principal and resource fields (but in different combinations). With some clever caching, we may be able to reduce the amount of work we do on every request.

Another avenue of exploration is to attempt lazy-loading using the Resolver interface. Instead of converting the whole input to AST every time, the Resolver could help us selectively convert portions of the input as needed.

@charithe
Copy link
Contributor Author

Superseded by #354

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

1 participant