Skip to content

Conversation

nunomaduro
Copy link
Member

@nunomaduro nunomaduro commented Jul 2, 2025

this pull request adds the --parallel option to laravel pint, enabling it to fully leverage the parallel capabilities of php cs fixer. the results are just insane:

the “40x” faster claim, is on the first run, and will depend on your laptop, but on mine: Apple M4 Max 36GB Ram.

laravel project with 1936 files:  
before: 2 minutes 🐌🐌  
after:  3 seconds 🏎️💨

laravel project with 989 files:
before: 41 seconds 🐌🐌  
after:  1 second 🏎️💨

this feature has actually been in php cs fixer for a while — we just hadn’t been using it until now. 🤷🏻‍♂️

finally, this new feature should be considered experimental and potentially unstable. therefore, i’ve added the experimental wording to the optional flag --parallel, so people can try it out in the meantime.

@nunomaduro nunomaduro marked this pull request as ready for review July 2, 2025 10:44
@nunomaduro nunomaduro marked this pull request as draft July 2, 2025 10:50
@nunomaduro nunomaduro marked this pull request as ready for review July 2, 2025 11:46
@taylorotwell taylorotwell merged commit 6d567e6 into main Jul 2, 2025
6 checks passed
@nunomaduro nunomaduro deleted the feat/parallel branch July 2, 2025 22:37
@mortenscheel
Copy link

@nunomaduro 2 minutes for 2000 files makes me wonder if you had XDEBUG_MODE set to something other than off. Because setting it to off gives me >10x performance. Would you consider doing that automatically in Pint? Lots of developers have it set to debug,develop by default, and might not know that it should be turned off when running Pint.

@Zen0x7
Copy link

Zen0x7 commented Jul 3, 2025

Thanks.

@Wirone
Copy link

Wirone commented Jul 8, 2025

Congrats for making Pint faster, but to be honest any reference to PHP-CS-Fixer/PHP-CS-Fixer#7777 or credits for me for actual work on parallel runner would be really welcome, though ☺️.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants