Enable parallel processing of HAML linting
What does this MR do and why?
The feature uses available CPUs to parallelize the linting (https://github.com/sds/haml-lint/pull/322). In CI, this appears to improve performance 20-50%.
Before
Sample job: https://gitlab.com/gitlab-org/gitlab/-/jobs/2942705845
$ run_timed_command "bin/rake 'haml_lint[app/views]'"
$ bin/rake 'haml_lint[app/views]'
1436 files inspected, 0 lints detected
==> 'bin/rake 'haml_lint[app/views]'' succeeded in 199 seconds.
EE sample job: https://gitlab.com/gitlab-org/gitlab/-/jobs/2942705846
$ run_timed_command "bin/rake 'haml_lint[ee/app/views]'"
$ bin/rake 'haml_lint[ee/app/views]'
544 files inspected, 0 lints detected
==> 'bin/rake 'haml_lint[ee/app/views]'' succeeded in 109 seconds.
After
Sample job: https://gitlab.com/gitlab-org/gitlab/-/jobs/2942739721
$ run_timed_command "bundle exec haml-lint --parallel app/views"
$ bundle exec haml-lint --parallel app/views
1436 files inspected, 0 lints detected
==> 'bundle exec haml-lint --parallel app/views' succeeded in 155 seconds.
EE sample job: https://gitlab.com/gitlab-org/gitlab/-/jobs/2942739722
$ run_timed_command "bundle exec haml-lint --parallel ee/app/views"
$ bundle exec haml-lint --parallel ee/app/views
544 files inspected, 0 lints detected
==> 'bundle exec haml-lint --parallel ee/app/views' succeeded in 58 seconds.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Stan Hu