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
feat: add concurrency option to parallelize package loading #778
Conversation
@kruskall Thanks for this improvement. I'll have a closer look at it soon. Please could you add some unit tests where the concurrency is more than |
|
@ccojocar Thank you for the feedback! I've added a test with a concurrency value of 32, a few more comments and made sure a goroutine would stop if there are no jobs left. Back to you 🏓 |
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.
Thanks for fixing the review comments. It looks good now!
This PR adds support for running package loading in parallel due to
gosec.load
being a major bottleneck for big projects.The concurrency option defaults to the number of available CPUs and tests are using a concurrency value of 1.
Benchmarks:
Benchmarks of a couple of GitLab projects using hyperfine:
Gitlab Pages:
before:
after:
Gitaly
before:
after: