#70079Performance impact of 6.2.15 class loader cache emptying
Description
Issue #67246 modified the way the class loader works:
Whenever a unresolvable class is detected, the class loading cache is thrown away.
We have two situations which make this undesirable:
- Code that uses a custom class autoloader. Each class in our code that is not resolvable via the default TYPO3 autoloader makes the class loading cache be thrown away. This increased page loading time by 1500% for us. We could work around this by putting our own autoloader before the TYPO3 autoloader.
- Extbase and FluidTYPO3 try to guess class names, and often guess it wrong with their first try. This also throws away the class loader cache, still slowing down our code – it increases page loading time 6.2.14 to 6.2.15 by 40%.
The following fluidtypo3 and extbase methods are responsible for this:
FluidTYPO3\Flux\Provider\AbstractProvider->resolveFormClassName() FluidTYPO3\Flux\Utility\ResolveUtility::buildControllerClassNameFromExtensionKeyAndControllerType() FluidTYPO3\Flux\Utility\ResolveUtility::resolveFluxControllerClassNameByExtensionKeyAndAction() TYPO3\CMS\Extbase\Mvc\Controller\ActionController->resolveViewObjectName() TYPO3\CMS\Extbase\Mvc\Request->getControllerActionName()
The TYPO3 team should really reconsider the idea of always assuming that the class loader cache is broken, just because a class could not be found.
Even if this supposedly only happens in development context, it’s still a major nuisance during development.