[TYPO3-v4] autoloader and path

Xavier Perseguers typo3 at perseguers.ch
Tue Jan 4 15:37:28 CET 2011


Hi,

> As the autoloader reads this file and expects an array, this file should
> be cheap. Imagine 100 requests to autoloader with makeInstance. This
> would be 100 times calling t3lib_extMgm::extPath. Even this function is
> static and small, this can be prevented by using
>
> $extensionPath = dirname(__FILE__);
>
> (__DIR__ is php >=5.3 only)
>
> I suggest to use this pattern instead which makes it a lot faster.
> Your opinion?

Definitively a +1!

Xavier


More information about the TYPO3-project-v4 mailing list