mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-10 14:54:17 +00:00
Increase batches per worker to 16
This commit is contained in:
parent
bcb88c4c3e
commit
61d28b3283
1 changed files with 3 additions and 2 deletions
|
|
@ -677,12 +677,13 @@ def calculate_pool_chunksize(num_checkers, num_jobs):
|
||||||
"""Determine the chunksize for the multiprocessing Pool.
|
"""Determine the chunksize for the multiprocessing Pool.
|
||||||
|
|
||||||
- For chunksize, see: https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.Pool.imap # noqa
|
- For chunksize, see: https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.Pool.imap # noqa
|
||||||
- This formula, while not perfect, aims to give each worker two batches of
|
- This formula, while not perfect, aims to give each worker 16 batches of
|
||||||
work.
|
work.
|
||||||
- See: https://github.com/pycqa/flake8/issues/829#note_18878876
|
- See: https://github.com/pycqa/flake8/issues/829#note_18878876
|
||||||
- See: https://github.com/pycqa/flake8/issues/197
|
- See: https://github.com/pycqa/flake8/issues/197
|
||||||
|
- See: https://github.com/pycqa/flake8/issues/1430
|
||||||
"""
|
"""
|
||||||
return max(num_checkers // (num_jobs * 2), 1)
|
return max(num_checkers // (num_jobs * 16), 1)
|
||||||
|
|
||||||
|
|
||||||
def _run_checks(checker):
|
def _run_checks(checker):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue