Closed adamchainz closed 2 years ago
Running from pre-commit with require_serial: true
is still triggering a high CPU load (99%) on my machine.
main
from curlylintThis was not meant to reduce the CPU usage. It's intentional that curlylint consumes as much CPU as possible whilst running, it uses parallelization in order to complete as fast as possible.
Also don't comment on old PR's, file a new issue and refer to previous relevant changes.
By default, pre-commit splits the files it wants to lint into one list per processor and launches one tool process for each. Since curlylint performs parallelization internally, this behaviour leads to a detrimental explosion of N * N processes. Setting
require_serial: true
in the hook definition disables pre-commit's parallelization.Black is in the same situation and sets
require_serial: true
: https://github.com/psf/black/blob/main/.pre-commit-hooks.yaml .