Skip to content

Conversation

herndlm
Copy link
Contributor

@herndlm herndlm commented Apr 2, 2022

First baby-step to making nested ConstantArrayType handling faster.

I noticed that describe is really slow for deeply nested constant arrays. So not calling describe for them twice can make quite a difference. For "normal" constant arrays I guess this is not more than a micro optimisation.

Don't expect any immediate follow-up PRs please.. describe (which is used for super type checks too AFAIK) seems to be quite an important bit to improve and there is more to do here, but it is for sure not everything that is making the nested constant arrays slow.

@ondrejmirtes ondrejmirtes merged commit ded3d21 into phpstan:1.5.x Apr 3, 2022
@ondrejmirtes
Copy link
Member

Thank you!

@herndlm herndlm deleted the avoid-describing-constant-array-type-values-twice branch April 3, 2022 09:09
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