Skip to content

change default value of --process to (number of CPUs)-1 - #4104

Merged
AyanSinhaMahapatra merged 1 commit into
aboutcode-org:developfrom
xsuchy:2980
Jun 25, 2025
Merged

change default value of --process to (number of CPUs)-1#4104
AyanSinhaMahapatra merged 1 commit into
aboutcode-org:developfrom
xsuchy:2980

Conversation

@xsuchy

@xsuchy xsuchy commented Jan 18, 2025

Copy link
Copy Markdown
Contributor

Related: #2980

Tasks

  • Reviewed contribution guidelines
  • PR is descriptively titled 📑 and links the original issue above 🔗
  • [-] Tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR
    Run tests locally to check for errors.
    Test suite fails to run for me, but the script run correctly.
  • Commits are in uniquely-named feature branch and has no merge conflicts 📁
  • Updated documentation pages (if applicable)
  • Updated CHANGELOG.rst (if applicable)

@xsuchy
xsuchy force-pushed the 2980 branch 2 times, most recently from cc8c78b to 4ded913 Compare January 23, 2025 18:48
@xsuchy

xsuchy commented Jan 23, 2025

Copy link
Copy Markdown
Contributor Author

I believe the tests failures on MacOS is not relevant to this code.

@AyanSinhaMahapatra AyanSinhaMahapatra left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xsuchy Thanks++ for the PR.
Overall this sounds like a nice idea, to increase the number of CPUs by default.
It seems like we have an agreement to have this at n-1 from #2980, and this sounds mostly fine to me, although n-2 could have been safer when users might have multiple other things open/in use if they are running scancode in their personal computers. But everywhere else this sounds great, and folks can always reduce the default CPU if it creates problems.

Not sure about the test failures, could you merge latest develop just to be sure?

@pombredanne please review this too.

Related: aboutcode-org#2980
Signed-off-by: Miroslav Suchý <msuchy@redhat.com>
@xsuchy

xsuchy commented Apr 5, 2025

Copy link
Copy Markdown
Contributor Author

Rebased on top of develop branch.

@DennisClark DennisClark left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

excellent improvement!

@AyanSinhaMahapatra

Copy link
Copy Markdown
Member

Thanks++ @xsuchy, this is a great addition! Merging.

@AyanSinhaMahapatra
AyanSinhaMahapatra merged commit 275d0df into aboutcode-org:develop Jun 25, 2025
@AyanSinhaMahapatra AyanSinhaMahapatra mentioned this pull request Jul 9, 2025
5 tasks
andrew added a commit to git-pkgs/licenses that referenced this pull request Sep 5, 2026
licenses timings re-measured on main after #42 and #43: cargo
0.91 -> 0.85 s, self 0.77 -> 0.74 s, RSS within noise. scancode
figures unchanged.

The -n default changed to N-1 in scancode-toolkit 32.4.0
(aboutcode-org/scancode-toolkit#4104), not 32.5.0.
andrew added a commit to git-pkgs/licenses that referenced this pull request Sep 5, 2026
* Add ScanCode comparison to README and benchmarking docs

Numbers measured against scancode-toolkit 32.5.0 on rust-lang/cargo at
a07c49a on an 8-core M1 Pro. Reproduction steps and the aggregate-RSS
sampling method are in docs/benchmarking.md.

* Refresh figures for 0da4c8b and correct -n default attribution

licenses timings re-measured on main after #42 and #43: cargo
0.91 -> 0.85 s, self 0.77 -> 0.74 s, RSS within noise. scancode
figures unchanged.

The -n default changed to N-1 in scancode-toolkit 32.4.0
(aboutcode-org/scancode-toolkit#4104), not 32.5.0.

* Note exit 2 behaviour in ScanCode comparison instructions

Repositories with unparseable manifests, including deliberately-invalid
test fixtures, produce per-file errors and a non-zero exit without
affecting the timing or RSS being measured.
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.

3 participants