Skip to content
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

Make result-cache independent from configs include order #2606

Merged
merged 1 commit into from Sep 8, 2023

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Sep 6, 2023

@ondrejmirtes ondrejmirtes merged commit 4241667 into phpstan:1.10.x Sep 8, 2023
409 of 413 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

@staabm staabm deleted the debug-cache branch September 8, 2023 14:01
@staabm
Copy link
Contributor Author

staabm commented Sep 11, 2023

@ondrejmirtes any plans for a new release? I think this change will save us minutes on every commit in CI

@ondrejmirtes
Copy link
Member

You don't have to hypothesize, you can verify it by requiring 1.10.x-dev 😊 Please report back the numbers.

@staabm
Copy link
Contributor Author

staabm commented Sep 11, 2023

if my testing in CI works as itended I can see PHPStan now using the cache, while it didn't before.
(I guess because of the extension loading order in our complex setup)

this means instead of a full project analysis which takes ~5min, it now only takes ~30secs because of cache utilization per commit.
(several phpstan invocations involved, because of a monorepo)

@ondrejmirtes
Copy link
Member

Rector using result cache doesn't make any sense.

@staabm
Copy link
Contributor Author

staabm commented Sep 11, 2023

I had a typo in my above comment. I updated it to say "PHPStan" not rector" ;)

@ondrejmirtes
Copy link
Member

Alright, can you please test the dev version anyway?

@staabm
Copy link
Contributor Author

staabm commented Sep 11, 2023

Alright, can you please test the dev version anyway?

I did. thats the numbers for the dev version

@ondrejmirtes
Copy link
Member

Alright, thank you 😊

@staabm
Copy link
Contributor Author

staabm commented Sep 11, 2023

for reference - full project analysis on my local machine of the same project

$ vendor/bin/phpstan --version
PHPStan - PHP Static Analysis Tool 1.10.x-dev@19801d9

$ time composer phpstan
...
real    2m47.226s
user    0m0.015s
sys     0m0.000s

vs.

$ vendor/bin/phpstan --version
PHPStan - PHP Static Analysis Tool 1.10.33

$ time composer phpstan
...
real    2m40.789s
user    0m0.000s
sys     0m0.030s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants