Just found this one while testing https://review.typo3.org/25673/:
will always trigger the class loader because it calls:
which of course is not a class and does not exist.
Therefore it will not be stored in the cache and the whole class loader process starts all over again.
This is done by every request to the page module (by the SysNote hook).
Maybe it would make sense to store information about non existing classes in the cache?
[TASK] Cache non existing classes
To prevent multiple retries when loading information about non existing
classes (e.g. caused by class_exists() calls) the cache is filled with
an empty string when a non existing class is detected.
With this information the class loader can return early and does not
need to run all expensive checks for determining the class file.
#6 Updated by Alexander Stehlik almost 6 years ago
Which class loader chain do you mean?
Do you mean the native PHP chain when multiple autoloaders are registered? If so I can not see a problem because if the TYPO3 class loader fails the next one in the chain should take over, right?
Or is there a class loading chain inside the TYPO3 class loader? If so it should be possible to cache non existing classes after the chain.
I agree that the TypeHandlingUtility needs to be fixed. And I can not really think of a use case when you would run a lot of class_exist calls of non existing classes. But this does not mean it will not happen.
Do you see other problems besides the loader chain?