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

Memoizing in ClassReflector/FunctionReflector/ConstantReflector would help with performance #615

Closed
ondrejmirtes opened this issue May 28, 2020 · 2 comments

Comments

@ondrejmirtes
Copy link
Contributor

See PoC implementation that uses inheritance for decoration (but it could be done directly in the implementation): https://github.com/phpstan/phpstan-src/blob/master/src/Reflection/BetterReflection/Reflector/MemoizingClassReflector.php

@Ocramius
Copy link
Member

I think the entire class/function/constant reflection where the reflectors depend on each other is very messy as it is: this totally requires an architectural change, rather than pushing more responsibility down the reflectors themselves.

@Ocramius
Copy link
Member

This is mostly solved by #772.

I suggest that we let userland implement this for now, and later on we can go back to it and add a decorator for Reflector by default later, should it be interesting.

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

No branches or pull requests

2 participants