-
Notifications
You must be signed in to change notification settings - Fork 146
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
Pint is painful to use in large projects #309
Comments
Thank you for reporting this issue! As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub. If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team. Thank you! |
12 minutes for 4698 files seems high. For reference, I have a project with 2993 files, and it only takes 56 seconds without using cache on a Macbook Pro with an M3 Pro CPU. I'm using the Laravel preset. Maybe running pint within Docker is causing it to run slower? |
Since the pull request (#325) has not been merged, you can try the following two methods to see if they fix the performance issue:
or
|
@bepsvpt that was an easy 10x performance improvement 😂 Now it takes ~1 minute. I hope @taylorotwell reconsiders merging your PR. |
I'm glad to hear that the methods provided above were able to resolve the performance issue you encountered! |
@mortenscheel just to know, which types of files takes more time? On my case #299, i had a couple of files with large arrays declared, just to understand the reason behind the slow performance. |
How do you find that out? All I can say is that the process was sluggish, but it didn't seem like it was only a couple of files that were slow. |
Pint Version
1.18.1
PHP Version
8.3.4
Description
I know that Pint's lack of parallelization has been discussed before in #93, #275 and #299 - but I would like to provide an example of how just how big this problem can be.
My team works on a very large modularized monolith Laravel app. Pint has to process 4698 php files.
On a new Macbook Pro with top specs, this takes at least 12 minutes, and that's when there's nothing it has to fix. When we used php-cs-fixer it took only a fraction of that time.
Of course it only takes this long when there are no cached results, but there are a lot of things that will cause the cache to be busted:
:latest
base image.Every time one of these things happen, we have to sit and wait for at least 12 minutes. That is more than just a minor annoyance, and I hope you'll agree that it's worth looking into.
Steps To Reproduce
The text was updated successfully, but these errors were encountered: