[BUGFIX] Improve performance with symfony/property-info 76/61076/5
authorAlexander Schnitzler <git@alexanderschnitzler.de>
Mon, 17 Jun 2019 16:12:56 +0000 (18:12 +0200)
committerAndreas Fernandez <a.fernandez@scripting-base.de>
Fri, 28 Jun 2019 13:47:54 +0000 (15:47 +0200)
commite4cc43a4c5ec21404bfc2eb69da8c640ff71cca8
treeae2c4b202ed431343dd5d8ed256fd37b85fafcab
parentf0f878764ac444ab62751b4f3512bbd3eca27f8a
[BUGFIX] Improve performance with symfony/property-info

With the introduction of symfony/property-info, the class
\Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor
has been used to extract property types from the php doc.

Unfortunately said extractor class doesn't cache the so
called context object, which is created repeatedly for
each property of each class.

The context object is used to determine non FQCN's and
its creation comes at very high costs.

To fix this issue, a custom PhpDocExtractor class has
been created which acts just like the original one, but
which caches the context objects.

Releases: master
Fixes: #88033
Change-Id: I54bec5b8adadeb6bde107547cbd115fa8be97526
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61076
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
typo3/sysext/extbase/Classes/Reflection/ClassSchema.php
typo3/sysext/extbase/Classes/Reflection/PropertyInfo/Extractor/PhpDocPropertyTypeExtractor.php [new file with mode: 0644]
typo3/sysext/extbase/Tests/Unit/Reflection/PropertyInfo/Extractor/PhpDocPropertyTypeExtractorTest.php [new file with mode: 0644]