Project

General

Profile

Actions

Bug #24502

closed

[Performance] Speed up makeInstance() by caching getClassName() results

Added by Christian Kuhn almost 14 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2011-01-09
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

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.

(issue imported from #M16951)


Files

16951_01.diff (1.22 KB) 16951_01.diff Administrator Admin, 2011-01-09 01:50
Actions #1

Updated by Christian Kuhn almost 14 years ago

trunk rev. 10021

Actions #2

Updated by Susanne Moog over 13 years ago

  • Target version deleted (4.5.0)
Actions

Also available in: Atom PDF