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

"jobs = 0" is twice slower than "jobs = 1" when running via "pre-commit" #7245

Closed
simon-liebehenschel opened this issue Jul 31, 2022 · 1 comment
Labels
Duplicate 🐫 Duplicate of an already existing issue

Comments

@simon-liebehenschel
Copy link

simon-liebehenschel commented Jul 31, 2022

Bug description

"jobs = 0" is twice slower than "jobs = 1"

(57 seconds VS 30 seconds)

Commands

Set jobs = 0:

# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use, and will cap the count on Windows to
# avoid hangs.
jobs = 0

Result:

time pre-commit run pylint --all-files
pylint...................................................................Passed

real    0m57,423s
user    3m9,893s
sys     0m5,131s

Set jobs = 1:

# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use, and will cap the count on Windows to
# avoid hangs.
jobs = 1

Result:

time pre-commit run pylint --all-files
pylint...................................................................Passed

real    0m30,851s
user    1m39,719s
sys     0m2,460s

Expected behavior

"jobs = 0" and "jobs = 1" must have the same execution time when running via "pre-commit"

As the documentation says, jobs can not be < 1, so if I set jobs = 0, then pylint must automatically set jobs amount >=1. In other words, speed with "jobs = 0" can not be lower than "jobs = 1".

Pylint version

pylint 2.14.5
astroid 2.11.7
Python 3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0]

OS / Environment

Lubuntu 22.04

@simon-liebehenschel simon-liebehenschel added the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label Jul 31, 2022
@Pierre-Sassoulas
Copy link
Member

Duplicate of #2525

@Pierre-Sassoulas Pierre-Sassoulas marked this as a duplicate of #2525 Jul 31, 2022
@Pierre-Sassoulas Pierre-Sassoulas closed this as not planned Won't fix, can't repro, duplicate, stale Jul 31, 2022
@Pierre-Sassoulas Pierre-Sassoulas added Duplicate 🐫 Duplicate of an already existing issue and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Jul 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate 🐫 Duplicate of an already existing issue
Projects
None yet
Development

No branches or pull requests

2 participants