Performance regression in 1.9.x-dev after 1.9.2 #8397
Replies: 6 comments 23 replies
-
|
Thank you for your information. I'll look into it in a few days! |
Beta Was this translation helpful? Give feedback.
-
|
Started investigating. Could confirm that phpstan/phpstan-src#2007 caused the performance regression. |
Beta Was this translation helpful? Give feedback.
-
|
Timing for each commit between 1.9.2 to 1.9.x |
Beta Was this translation helpful? Give feedback.
-
|
So right now it's still 17.5 seconds on my computer on 1.9.2 and around 20 seconds on 1.9.x. I'll run Blackfire and let you know if we can improve something. |
Beta Was this translation helpful? Give feedback.
-
|
Alright, I'm tackling the problem head-on. What I did was to debug why is echo sprintf('%s vs. %s' . PHP_EOL, $a->describe(VerbosityLevel::precise()), $b->describe(VerbosityLevel::precise()));And I ran this on both 1.9.2 and 1.9.x (just analysing two biggest files to give us an idea): The Blackfire profile comparison is here: https://blackfire.io/profiles/compare/bb9237de-d7a6-4d37-aea7-eb7660f822a1/graph And the debug log between these two versions is 26 MB vs. 76 MB! And if I diff these logs, the most common difference is that types are subtracted more often and DetailsI'll continue to debug why it happens and how to make it faster. Anyone, feel free to look into this too :) |
Beta Was this translation helpful? Give feedback.
-
|
just a small summary after some perf related work which landed in 1.9.x I have profilled all snippets available in issues labeled "performance". everything which stood out was optimzed. also left are algorithmic improvements, especially within TypeCombinator. working more efficiently with big unions is the next big quest. |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
-
Hello @rajyan, I just got back home from SymfonyCon, and tried running PHPStan locally, and noticed it's about 50 % slower for me. (it runs in about 29 seconds instead of the usual 17 seconds). I test it with
time make phpstanin phpstan-src.I wasn't able to pin down the cause besides proving it has to be in one of your commits. Unfortunately I can't revert them individually because that way I create a lot of conflicts which I don't know how to solve, but if I revert all of your commits since 1.9.2, the performance problem is solved again:
Can you please investigate it so we're not forced to revert your awesome fixes? :) Thank you very much.
I'll try to do some Blackfire profiles if I get the chance.
Beta Was this translation helpful? Give feedback.
All reactions