[TYPO3-core] Feature #9633: Implement autoloading for TYPO3
Oliver Hader
oliver at typo3.org
Fri May 1 21:23:08 CEST 2009
Hi Dmitry,
Dmitry Dulepov schrieb:
> Hi!
>
> Oliver Hader wrote:
>> The patch of the current RFC is partly based on your work. However,
>> using a serialized array (different in FE and BE disposal) that contains
>> all classes of core and extension files leads to some problems:
>> * another deserialization of a large string on every request takes some time
>
> This is faster than parsing PHP arrays or doing database queries. I made benchmarks. When compared to PHP arrays, it is nearly 10 times faster. This is why I opted to serialized configuration in RealURL.
I have to state that I was wrong here. I did a comparison of the
core_autoload.php file as PHP file and a serialized equivalent.
Using a the serialization was 100% faster in this case - the difference
was 250 micro-seconds (0.25 ms).
> Did anyone do a benchmark of Sebastian's solution?
Yes. A website without autoloading, your patch and the patch of this RFC
have been compared in frontend disposal. All "require_once()" of files
in t3lib/ have been removed from the core files for this test.
* without autoloading: 100% parsing time (base)
* with autoloading of this RFC: 75,57%
* with autoloading by Dmitry: 75,42%
So, the results of both autoloading approaches are almost the same and
differed in 1-2 ms. eAccelerator was not used for this test...
>> * using the autoloader during development (implementing and
>> reviewing/testing) takes some more time, since the whole registry file
>> has to be rebuild manually to enable autoloading for the new stuff
>
> If I remember correctly, my patch solved that in some way.
You had a CLI script that could be used via cron job to update the
registry periodically... Hm...
olly
--
Oliver Hader
TYPO3 Release Manager 4.3
More information about the TYPO3-team-core
mailing list