-
Notifications
You must be signed in to change notification settings - Fork 49
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
perf: Reduce template compilation time by ~16% #206
perf: Reduce template compilation time by ~16% #206
Conversation
Signed-off-by: Will Beason <willbeason@google.com>
Signed-off-by: Will Beason <willbeason@google.com>
Signed-off-by: Will Beason <willbeason@google.com>
Codecov Report
@@ Coverage Diff @@
## master #206 +/- ##
==========================================
- Coverage 46.65% 46.28% -0.37%
==========================================
Files 64 64
Lines 2840 2815 -25
==========================================
- Hits 1325 1303 -22
Misses 1295 1295
+ Partials 220 217 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Signed-off-by: Will Beason <willbeason@google.com>
Ultimately this is just refactoring - no visible changes to users or consumers of this library. |
Signed-off-by: Will Beason <willbeason@google.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Will Beason <willbeason@google.com>
Tested locally via go.work - passes in Gatekeeper. |
Remove unnecessarily parsing Rego multiple times. Converting to/from the parsed Rego AST is expensive, so removing this results in a significant speedup in compilation times.
Before:
After: