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

OPA AST parser takes too long to evaluate large response #3340

Closed
t83714 opened this issue Mar 29, 2022 · 1 comment
Closed

OPA AST parser takes too long to evaluate large response #3340

t83714 opened this issue Mar 29, 2022 · 1 comment
Labels
Milestone

Comments

@t83714
Copy link
Contributor

t83714 commented Mar 29, 2022

OPA AST parser takes too long to evaluate the large response

Our current typescript version OPA AST parser (for v2 release on next branch) takes too long (around 10s) to evaluate the large response.

Here is the sample file:

extraLargeResponse.json.txt

Most time seems spent on evaluate function.

How to reproduce

  • read the sample file as a string
  • then run the following code:
const parser = new OpaCompileResponseParser();
const data = parser.parse(JSON.stringify(extraLargeResponseString));
const result = parser.evaluate();
@t83714 t83714 added the bug label Mar 29, 2022
@t83714 t83714 added this to the Next (v2.0.0) milestone Mar 29, 2022
t83714 added a commit that referenced this issue Mar 30, 2022
t83714 added a commit that referenced this issue Apr 1, 2022
…ble rules".

Plus, we will also filter out duplicate expressions.
@t83714
Copy link
Contributor Author

t83714 commented Apr 4, 2022

closed via #3334

@t83714 t83714 closed this as completed Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant