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

Don't re-calculate node-key over and over again #2073

Merged
merged 1 commit into from
Dec 10, 2022

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Dec 10, 2022

we call this method milions of times. lets do it upfront and re-use the value.

node-key calculation is fast already, but it requires a lot of method call across a lot of classes.
doing less calls saves this method call overhead.

grafik

@ondrejmirtes
Copy link
Member

Yes! 🎉

BTW if you'd find a way to include Blackfire in CI so it'd give us useful report each time, that'd be great! Otherwise the performance will get worse over time again.

@staabm
Copy link
Contributor Author

staabm commented Dec 10, 2022

include Blackfire in CI so it'd give us useful report each time

blackfire supports performance assertions. but this requires a paid plan.

maybe there is room for a sponsoring by blackfire so we can achieve that

@ondrejmirtes
Copy link
Member

Blackfire sponsors PHPStan, maybe they could chip in with a plan too 😀 Currently I'm using Slevomat's paid account.

@ondrejmirtes ondrejmirtes merged commit 63da9bc into phpstan:1.9.x Dec 10, 2022
@ondrejmirtes
Copy link
Member

Thank you!

@staabm staabm deleted the node-key branch December 10, 2022 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants