Replies: 1 comment 1 reply
-
Hi @somsom13! Data from storage is unmarshalled on each policy execution. This is however currently investigated in open-policy-agent/opa#4147, and might get optimized in a future release. The fact that you're seeing a large speed difference between when nested entities are arrays or objects is surprising. Is this consistent over multiple runs? Is it possible for you to share the full policy and data you're using in your tests? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I have a question about OPA's data approach in policy.
I have this data.
And in the policy, I look up the value with
my_data := data.permissions[input.domain]
.When I profile my policy, there is too much difference in the speed of executing this line (
data.permissions[input.domain]
), when the data is in the form of an object and in the form of an array.Originally, I thought that after OPA loads the bundle, it doesn't load data to memory even if I approach to the data in policy.
So, here's my question.
data.permissions[input.domain]
inside the policy, does it load a new one every time the policy is executed?Beta Was this translation helpful? Give feedback.
All reactions