Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[TypeInfo] Add result cache toTypeContextFactory#61765
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
src/Symfony/Component/TypeInfo/TypeContext/TypeContextFactory.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/TypeInfo/TypeContext/TypeContextFactory.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/TypeInfo/TypeContext/TypeContextFactory.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/TypeInfo/TypeContext/TypeContextFactory.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
TypeContextFactory8a9f8b5 toa29f10bComparesrc/Symfony/Component/TypeInfo/TypeContext/TypeContextFactory.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/TypeInfo/TypeContext/TypeContextFactory.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
defb034 tocb47384CompareThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
For 7.4 as this is a performance improvement.
Add a cache to method with the aims to optimizedeserialization and form validation.Closessymfony#61725
cb47384 toe39963fCompareThank you@landure. |
cc7090f intosymfony:7.4Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Add caches to
TypeContextFactorymethod to prevent multiple parsing of the same classes by PHPStan property extractor.Add cache to intermediate
TypeContextcreation fromcreateFromClassName()andcreateFromReflection()by adding:intermediateTypeContextCacheproprety.createIntermediateTypeContext()create the intermediateTypeContextif not found in cache.Add cache to
createFromClassName()by:typeContextCacheproprety.TypeContextcreation to privatecreateNewInstanceFromClassName()method.createFromClassName()to get theTypeContextfrom$this->typeContextCache, or creating it by callingcreateNewInstanceFromClassName()method.Add a test to check that the results are cached.
This optimize deserialization and form validation.