[TYPO3-core] Announcing TYPO3 CMS 6.1.0 Alpha1

Alexander Opitz alexander.opitz at netresearch.de
Tue Mar 19 16:16:30 CET 2013


Heyho,

so I found one of the big mess in time and it seems to be the Class

TYPO3\CMS\Core\Core\ClassLoader


In ClassLoader::unregisterAutoloader we have three lines

     static::$classNameToFileMapping = array();
     static::$aliasToClassNameMapping = array();
     static::$classNameToAliasMapping = array();

All three vars are very large and so PHP needs much time to clean up 
memory. As we are on unloading, do we need to reset them to empty 
arrays? This takes 1%-2% of time for a cached request.

In ClassLoader::loadClassLoaderCache we have the lines

     static::$classNameToAliasMapping = 
array_flip($aliasToClassNameMapping);
     self::setAliasesForEarlyInstances();

The array_flip function call takes around 1% of time 
$aliasToClassNameMapping is to large.

The setAliasesForEarlyInstances function does a array_intersect on very 
large arrays and takes around 5% of time.

So I get 7% - 8% speed improvements only by removing this lines.

Results for TYPO3 6.1.0alpha1 after change:

TYPO3 6.1.0alpha1 PHP 5.3.23 MySQL 5.5.28
ab -c 10 -n 100 http://61.typo.nr/?no_cache=1
Time taken for tests:   8.930 seconds
Total transferred:      1030500 bytes
HTML transferred:       1001800 bytes
Requests per second:    11.20 [#/sec] (mean)
Time per request:       893.016 [ms] (mean)
Time per request:       89.302 [ms] (mean, across all concurrent requests)
Transfer rate:          112.69 [Kbytes/sec] received

TYPO3 6.1.0alpha1 PHP 5.3.23 MySQL 5.5.28
ab -c 100 -n 1000 http://61.typo.nr/
Time taken for tests:   1.558 seconds
Total transferred:      1043300 bytes
HTML transferred:       999600 bytes
Requests per second:    64.20 [#/sec] (mean)
Time per request:       155.774 [ms] (mean)
Time per request:       15.577 [ms] (mean, across all concurrent requests)
Transfer rate:          654.05 [Kbytes/sec] received


I know, thats not the best way, but a point to start, maybe we need to 
reduce the amount of old class names to get the arrays smaller (5000+ 
entries).


Greetings Alex//

-- 
Viele Grüße
Alexander Opitz
Developer

T: +49 341 47842 15

++++++++++++++
Netresearch - Passion for eCommerce
++++++++++++++

Netresearch GmbH & Co. KG
Nonnenstraße 11d - 04229 Leipzig
http://www.netresearch.de

Registergericht: AG Leipzig HRA 15614
Komplementär: Netresearch Beteiligungs GmbH, AG Leipzig HRB 17018
Geschäftsführer: Michael Ablass


More information about the TYPO3-team-core mailing list