[TYPO3-dev] How to use the new autoloader feature?

Ingo Renner ingo at typo3.org
Mon Jun 1 23:13:28 CEST 2009


Martin Kutschker wrote:

hi Masi,

> IMHO using a standard filename and class name pattern should be enough
> for the autoloader to find the class. Only legacy class names that don't
> match the requirements should be registered manually.

Yes, that was my opinion at first too. However I changed my mind about 
that in favor of the "registry", here's why: Building the path to a 
class file from its name might be nice, but would always require an 
additional file_exists() call which in again (AFAIK) does some more file 
system calls in the PHP core... this makes the autoloader unnecessary 
slow. With the registry file you only have on single file_exists call or 
when setting a flag in ext_emconf.php that one wouldn't be needed either.

On serialized arrays: Why serializing and deserializing on every page 
request when you can have the native and human readable format? (saving 
calls to deserialize())


All the best
Ingo

-- 
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2





More information about the TYPO3-dev mailing list