[TYPO3-core] RFC #14674: Replace calls to t3lib_extMgm:: within t3lib_extMgm to self:: due to performance reasons

Ries van Twisk typo3 at rvt.dds.nl
Wed Jun 9 23:18:52 CEST 2010


> Hi,
>
> Jigal van Hemert schrieb:
>> Sebastian Michaelsen wrote:
>>> As we have done it with t3lib_div, t3lib_extMgm should also call  
>>> its own static methods via self:: which is faster.
>> A pretty useless operation because the speed difference is so  
>> small. On different servers it was 0.2-0.5 microsecond faster per  
>> call...
>> But hey, it's not slowing things down, so
>> +1 by reading.
>
> it has more advantages:
> * it's faster (no matter how much)
> * it's easier for reading: Ah it's $this-> / self:: so same class
> * it's shorter, so it shortens the file (and the lines) :)
> * it remembers you by reading that you're in a static class/function
>
> vg Steffen

small note: For these classes that are not final I would use static  
instead of self (PHP 5.3 only),
care must be taken though...

Ries



More information about the TYPO3-team-core mailing list