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

Lint files in parallel #113

Closed
anderseknert opened this issue May 23, 2023 · 0 comments · Fixed by #125
Closed

Lint files in parallel #113

anderseknert opened this issue May 23, 2023 · 0 comments · Fixed by #125
Assignees

Comments

@anderseknert
Copy link
Member

Testing Regal on a medium large policy repo (116 policy files) and unsurprisingly, it's slow — total time to lint clocked in at about 12 seconds. This is with all the rules enabled, mind you, but since we're likely making that the default, we should try and improve this before a first release. Collecting and reporting metrics will be of great help for further optimizations, but since most of the time is likely always spent evaluating Rego — and each input file is evaluated individually — it seems like an easy win to parallelize linting across all the input files.

An option to turn this off, or to configure the level of parallelism would be nice, but perhaps not needed for the first iteration.

charlieegan3 added a commit that referenced this issue May 24, 2023
This only makes the rego evaluation concurrent.

An option to write output to a file has also been added.

Fixes: #113, at least as a first
pass. There is always GOMAXPROCS.

Signed-off-by: Charlie Egan <charlie@styra.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants