[TYPO3-core] RFC #16951: [Performance] Speed up makeInstance() by caching getClassName() results
Christian Kuhn
lolli at schwarzbu.ch
Sun Jan 9 01:54:56 CET 2011
This is an SVN patch request.
Type: Performance improvement
Branches: trunk
BT: http://bugs.typo3.org/view.php?id=16951
Problem:
Every makeInstance() call determines the final class name by checking in
getClassName() with class_exists() for 'ux_' classes.
Solution:
Add a very simple first level cache around the getClassName() call to
look up already determined final class names in a local array for
consecutive calls with the same class.
Notes:
The autoloader (which eats up most time of the class_exists() call) is
pretty expensive but has some local caching as well. So, this patch is
not as effective as it seems at first glance and just speeds up 'a bit'.
On a pretty native introduction package I was able to reproduce a gain
for a full cached page between 0,5 and 1,5%, which is actually near to
experimental standard deviation. Still, this patch can not make things
slower.
Regards
Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 16951_01.diff
Type: text/x-patch
Size: 1251 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20110109/9ca06b4a/attachment-0001.bin>
More information about the TYPO3-team-core
mailing list