opa
opa copied to clipboard
Defined check performance improvement
When compared, avoiding realization of lazy types unless type of compared value supports a positive match. This removes type conversion cost of policies that only check presence of a value, but doesn't operate on it, e.:
package test
allow {
data.collection
}
where data.collection is an object originating from a Store.
Also adding a lazyArray type, which solves for the same edge case as above, but where data.collection is an array.
Fixes: #5946.
Deploy Preview for openpolicyagent ready!
| Name | Link |
|---|---|
| Latest commit | f9f545f88d59e89e855fcefb76998f5727c5d193 |
| Latest deploy log | https://app.netlify.com/sites/openpolicyagent/deploys/651d5e690e0f2800088b1379 |
| Deploy Preview | https://deploy-preview-6040--openpolicyagent.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
💭 What does the naked ref get compiled to? When I was thinking about this problem before, I thought we might be able to figure it out in topdown: instead of retrieving the ref and comparing to to false, perhaps we could have a special case there where it's not going the ordinary route (InterfaceToValue), but special-cases the "exists and truthy" check on a lower level... 🤔 Am I making sense? I guess you've explored and dismissed this route before, just wondering.
This pull request has been automatically marked as stale because it has not had any activity in the last 30 days.
This pull request has been automatically marked as stale because it has not had any activity in the last 30 days.
Closing this PR, as the breaking API changes makes it very unlikely that this will ever get merged. The lazy-object optimization has already been merged to main in #6060.