pint icon indicating copy to clipboard operation
pint copied to clipboard

Pint is too slow

Open Zen0x7 opened this issue 4 months ago • 1 comments

Pint Version

1.18

PHP Version

8.3

Description

I just install pint in a old laravel project that was upgraded to version 11, anyways, that's not the point, when ran the command, was too slow ...

https://github.com/user-attachments/assets/50db60cc-e7a6-4960-b975-c2294a0b7cd9

Yeah, video quality stinks but it's something that just happens.

I'm not pretty sure what is going on but the truth is that some files in my code contains a huge amount of array elements. Yup, so ... probably is something about that, IMHO isn't a huge problem but the point is, there a way to run pint in parallel? similar like when you're compiling some C/C++ and use -j<threads> or even can be like --parallel from testing, but maybe can be considered as overthink, anyways, if there are projects affected they can reduce their CI pipelines by doing that.

Steps To Reproduce

  1. Create a repo from scratch.
  2. Add a bunch of classes in the same folder.
  3. Declare array attribute in every class.
  4. Push 2000 array elements, ideally with 2 elements, inside that array.
  5. See what happens when you ran pint.
class Stuff {
    $array = [
         [1,2],
         [1,2],
         [1,2],
         [1,2],
         ...
    ]
}

Zen0x7 avatar Oct 08 '24 18:10 Zen0x7