phpro / grumphp

A PHP code-quality tool
MIT License
4.15k stars 431 forks source link

PHP CS Fixer v2 integration is slow #327

Closed keradus closed 7 years ago

keradus commented 7 years ago

v2 allows to run single process with multiple files. current implementation runs multiple processes per single file: https://github.com/phpro/grumphp/blob/53816aef86fb497e79fad024d5299f002c9ed1b7/src/Task/AbstractPhpCsFixerTask.php#L120 as you dont run the Runner class but call CLI command, this will run 10 commands instead of one, making it 10 times slower.

veewee commented 7 years ago

It was added in V1 to run the task in parallel and just copied for V2. I did not know it had support for multiple files in V2. Feel free to improve the task at any time.

SerkanYildiz commented 7 years ago

What kind of solution do we want here? We can pass the value of the project dir to the fix parameter that will scan all files in 1 time. Or we can check the changed files/files to commit and find common directories and scan dirs instead of files. I would be happy to fix this.

keradus commented 7 years ago

I would suggest to either:

veewee commented 7 years ago

Fixed in #395