[TYPO3-core] RFC #16951: [Performance] Speed up makeInstance() by caching getClassName() results

Christian Kuhn lolli at schwarzbu.ch
Thu Feb 10 20:16:54 CET 2011


Hey,

On 02/10/2011 11:06 AM, Pierre Dudoret wrote:
> Check the attached patch :
> - No more recursivity

Recursions are quick, pushing registers to stack takes nanoseconds if at 
all. That's nothing from php point of view. Did you actually measure a 
performance gain or is your patch an assumption?


> - Only one call to class exists per iteration instead of 2

Why? Your first 'if' only fails if there is no such class (-> error out 
-> exception -> no production code). Thus, the second class_exists() in 
while() is always called, so no reduction of class_exists() calls. Where 
is the difference to the recursive method? Did I get something wrong?


Regards
Christian


More information about the TYPO3-team-core mailing list