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

feat: worker per file #1017

Merged
merged 10 commits into from
May 31, 2023
Merged

feat: worker per file #1017

merged 10 commits into from
May 31, 2023

Conversation

didroe
Copy link
Contributor

@didroe didroe commented May 29, 2023

Description

Improves parallelization during scans:

  • Refactors the worker logic to scan a single file in a worker
  • Sets the default number of workers to the minimum of the number of CPUs and 4. This can be overriden with the --parallel flag

Following these changes, a scan of Discourse goes from ~20mins to ~5mins on my machine.

Also: parallelism was removed from the E2E tests as they use the same report file name and were clashing

Related

Checklist

  • I've added test coverage that shows my fix or feature works as expected.
  • I've updated or added documentation if required.
  • I've included usage information in the description if CLI behavior was updated or added.
  • PR title follows Conventional Commits format

@didroe didroe force-pushed the feat/support-parallel-workers branch 4 times, most recently from 37428ec to e37ea39 Compare May 30, 2023 10:18
@didroe didroe marked this pull request as ready for review May 30, 2023 10:18
@didroe didroe requested a review from cfabianski May 30, 2023 10:18
@didroe didroe force-pushed the feat/support-parallel-workers branch 2 times, most recently from dc36f5c to 3457aa1 Compare May 30, 2023 12:31
@didroe didroe force-pushed the feat/support-parallel-workers branch 3 times, most recently from fc6d0be to 9561d98 Compare May 30, 2023 15:26
@didroe didroe force-pushed the feat/support-parallel-workers branch from fe0441d to 87b8b1e Compare May 31, 2023 08:56
@didroe didroe force-pushed the feat/support-parallel-workers branch 2 times, most recently from b85b7a2 to caeff3e Compare May 31, 2023 09:53
@didroe didroe force-pushed the feat/support-parallel-workers branch from caeff3e to 23a6b98 Compare May 31, 2023 10:46
@didroe didroe force-pushed the feat/support-parallel-workers branch from 23a6b98 to 186ea7f Compare May 31, 2023 11:31
@didroe didroe merged commit a90388c into main May 31, 2023
6 checks passed
@didroe didroe deleted the feat/support-parallel-workers branch May 31, 2023 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Paralleize file scanning
2 participants