-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[Wiki] Add more information about parallel
option
#1732
Comments
I just tried running PHPCS against Customize Posts and get the following results with
So yeah, wow, it can really speed up processing. There is a logarithmic relationship between parallel process count and the overall time it takes. |
If you're running on a VM, remember to allocate more cores. Using |
When you write the output into a report the only thing you see on the console is one result for each process. That means that instead of having one output for each file you suddenly only have My concrete use-case was that I set the parallel-value to 75 but only seem to have gotten 73 processes. More interestingly that was exactly the number of files within the top level of my given path… So instead of checking for the parallel-value I spent an hour debugging why phpcs is not parsing the given folder recursively… Perhaps the output could be changed from a Or perhaps at least state that information in the (currently not existing) documentation 😉 |
Hi All, Im quite interested in using the However, if I add |
@darthvader666uk make sure PHP is compiled with PCNTL support, or the CLI setting wont do anything. Once you have it, you should only see 4 dots in the verbose output instead of 1 per file:
|
thank you @gsherwood ! I have enabled PCNTL support in my docker image and worked! Someone I missed that information! Sorry about that. |
I've been testing this to see if some recommendations can be made about the number of processes to run in parallel, but it seems to be not straightforward. On less powerful machines the process seems to be CPU bound, and I had good success with running Maybe a good recommendation could be:
|
a good initial value is |
|
@mabar cool! i think the windows equivalent is
maybe
|
Closing as replaced by PHPCSStandards/PHP_CodeSniffer#10 |
I've just been looking into the
parallel
running option a bit more and am left with some questions.phpcs
as well asphpcbf
?It might be useful to add a section to the Wiki Advanced Usage page about this.
The text was updated successfully, but these errors were encountered: