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

High evaluation time when referencing huge array #5946

Open
anderseknert opened this issue May 24, 2023 · 4 comments
Open

High evaluation time when referencing huge array #5946

anderseknert opened this issue May 24, 2023 · 4 comments

Comments

@anderseknert
Copy link
Member

Even when "unused", simply referencing a huge array will have a big impact on evaluation time.

package evaluator

access := bar {
	data.slow_bundle.index.feeds
	bar := "baz"
}

In the above case data.slow_bundle.index.feeds is a 10 MB JSON array containing some huge objects. I'd expect a simple reference to not have that kind of impact, as there's no evaluation needed in this case.

@itayhac
Copy link

itayhac commented Jun 1, 2023

Thanks guys! we really got to the point where this is an actual problem.

@anderseknert
Copy link
Member Author

@itayhac 👍 If you're able to share your actual policy where this is problematic, it could be a good test case for the fix.

@itayhac
Copy link

itayhac commented Jun 4, 2023

@anderseknert unfortunately the actual policy is a client's proprietary. but i will happily test the solution on the actual policy and update the result here.

@anderseknert
Copy link
Member Author

anderseknert commented Jun 5, 2023

Sounds good. The reason I'm asking is that while the problem exposed by the example policy above is real, referencing an array without actually using it.. I guess there are cases where you'll want to know that it's defined, but most often the above example wouldn't make a lot of sense, I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

3 participants