-
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
Detect issues in parallel #421
Comments
This is something I am planning to look at for version 3. I've used pcntl_fork a fair bit for CLI programming, so I'd probably look into using it for this. |
I guess PEAR packages (as PHP_CodeSniffer) are not allowed to use Composer. Since otherwise using Symfony Process component would surely speed up the development flow and interprocess communications. The tricky part of how process forking works in PHP is that it copies over all open resources (e.g. open file pointers, db connections, etc.) to forked process. Then if forked process decides to close them this would result in same pointer closed in parent process as well. So we better create all these forks early when no resources were allocated and then each process will go it's own way. |
Why do this inside Such parallelization + HHVM involvement would give performance acceptable for any purpose I believe. |
To my knowledge the PHP_CodeSniffer is standalone tool and as such parallelization is supposed to speed up coding standard violation finding process. We're not trying to speed up own unit tests on Travis here 😉 |
Yeah, but it's already not so hard from outside the ParaTest is developed this way - from the inside of |
PHP_CodeSniffer is PEAR library, so I guess using Composer libraries to ease the job isn't an option (unless there is PEAR library with same purpose, which is also available from Composer). I don't know any plug-n-play solution to parallelize any script and then produce united output from it. |
Really? Thanks for pointing out, PHPUnit already abandoned sharing via PEAR channel and I thought it's a common trend. So, there is an acceptance criteria to use only something PEAR-available? With no Composer, no apt-get. |
PHPCS is still a PEAR package and will remain one for a while I imagine. But that doesn't really affect what code I can use. I just do not want to depend on any external library for something this core. Having said that, I'm not planning on devoting any time to this task for quite a while. |
I've added experimental support for this in 3.0 now. To use, add For example: Not all reports are currently working because they need to be changed over to not assume they are using a shared memory space. |
I've finished adding support for all reports. Everything seems to be working well. |
…dproperties-bugfix-skip-closure-use File::getMethodProperties(): skip over closure use statements
Maybe a speed at which large files are processed can be improved by:
I'm not sure what amount of change is required to do this and what performance can be gained through that.
Of course fixing still should happen sequentially or we maybe can fix several files in parallel.
The text was updated successfully, but these errors were encountered: