[TYPO3-core] RFC #9657: Instantiate time tracker as null object if not really required

Christian Kuhn lolli at schwarzbu.ch
Tue Sep 1 01:37:33 CEST 2009


Hey,

Rupert Germann wrote:
> Type: performance improvement
> 
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=9657
> 
> Branches: Trunk
> 
> Problem:
> In the TYPO3 front-end an instance of t3lib_timeTrack is created in the
> variable $TT. During the front-end rendering process the time required
> to parse and execute several scripts and modules is stored using this
> object. When there's no be_user logged in this information is never used
> and so timetracking only eats up precious performance.
> 
> Solution:
> Use a null object with empty methods in general and only use the current
> time tracker if a logged in be_user views pages in the front-end.


Great you brought that up again! This is one of the most effective
performance improvements in 4.3! I already benchmarked a local hack of
this some weeks ago and had something between 4 and 8% speed improvement.

Here is a happy +1 on reading and testing.


For the static debug_typo3PrintError(): This should be moved /
refactored somehow. Don't worry too much about the hook there (with
backwards compatibility in mind), this was just committed some weeks ago
with #8601 and is not released in stable version. Imho we should move
this method to an own class (?) and should wrap that in the timetrack
class with an @deprecated notation. The only reason for the existence of
this method is probably the early instantiation of this class in FE.


Thanks
Christian


More information about the TYPO3-team-core mailing list