Skip to content

Pint is painful to use in large projects #309

Open
@mortenscheel

Description

@mortenscheel

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:

  • If the php-cs-fixer dependency is updated to a newer version.
  • Every time you rebuild your docker container, unless you configure Pint to store the cache inside the project folder.
  • If php is updated to a newer version, even a patch release. This happens rather frequently, especially if run in a docker container using a :latest base image.
  • If you run pint on your host machine and the existing cache was created in docker (or vice versa), because the results are cached using absolute paths.

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

  1. Have a Laravel project containing several thousand files.
  2. Run pint.
  3. Go for a walk.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions