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
[mutation] Cache tester in AssignMetadata like we do in Assign mutators #1442
[mutation] Cache tester in AssignMetadata like we do in Assign mutators #1442
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1442 +/- ##
==========================================
+ Coverage 50.35% 50.60% +0.25%
==========================================
Files 77 77
Lines 5108 5110 +2
==========================================
+ Hits 2572 2586 +14
+ Misses 2185 2174 -11
+ Partials 351 350 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
0e2ae5e
to
8171e05
Compare
a1073f0
to
e9b0bf6
Compare
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.
Signed-off-by: Will Beason <willbeason@google.com>
Signed-off-by: Will Beason <willbeason@google.com>
e9b0bf6
to
458774d
Compare
…rs (open-policy-agent#1442) Signed-off-by: juliankatz <juliankatz@google.com>
Note: depends on #1441
Per findings in #1441, we can greatly improve the speed of AssignMetadata.Mutate by caching the tester instead of recreating it every time we call Mutate.
This reduces the runtime when no mutation is made by 97%, and when mutations are made by 30%!
I'll send a separate PR which removes the unnecessary json unmarshalling in the case where we perform the mutation, once/if #1439 is merged.