Replies: 3 comments 14 replies
-
|
I'll let you know when it's going to be fast again, it's a priority for me. |
Beta Was this translation helpful? Give feedback.
-
|
After some optimizations I did today analysing Drupal core now finishes in around 3 minutes on my computer. Please try PHPStan 1.8.5 once I release it and report back. BTW I tried to do something about the big difference between 1.5.7 and 1.6.0 to figure out if there's more space for some other optimizations, but sadly PHPStan 1.5.7 cannot analyse Drupal core successfully, there's some code (incompatible method signatures between parent and child) that makes it crash. On PHPStan 1.7.0+ this isn't a problem thanks to static reflection, but I can't verify the same slowdown between 1.5.7 and 1.6.0 you have seen because of this problem. |
Beta Was this translation helpful? Give feedback.
-
|
@mondrake Hey, I just learn something super-interesting. I was able to make analysis of Drupal codebase several times faster by enabling bleedingEdge: includes:
- phar://phpstan.phar/conf/bleedingEdge.neonOn my computer, with the fresh checked-out repo, it takes 3m51s to analyze the whole codebase. In GitHub Actions, it's not able to finish in 30m. With bleedingEdge, on my computer it takes 1m15s to analyze the whole codebase. In GitHub Actions, it finishes in 5m38s (and that includes cloning the repo and And also it consumes only about 50 % of memory. The reason is probably this: https://phpstan.org/blog/phpstan-1-6-0-with-conditional-return-types#lower-memory-consumption Thanks to no memory cycles, the garbage collector has nothing to worry about so it doesn't spend CPU cycles searching for any memory to free up. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Thanks @ondrejmirtes @mglaman for looking into Drupal's static analysis performance with PHPStan 1.8.3 and 1.8.4.
While I believe there is one single outlier file causing the entire check run to slow down significantly,
modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php, see https://www.drupal.org/project/drupal/issues/3307789, let me add here some data from earlier monitoring.From https://drupal.slack.com/archives/C1BMUQ9U6/p1653044396566669
So to say that a big leap in processing time happened between 1.5.7 and 1.6.0.
I am sorry I am not in PHPStan's internals to be able to help, but I thought this could help.
Beta Was this translation helpful? Give feedback.
All reactions