Bug #20755
closedFrontend rendering is slowed down by timetracking
0%
Description
problem:
FE rendering is slowed down because many classes call methods of the timetrack object ($GLOBALS['TT']) - even when no BE user is logged in which could see the logged data in the adminpanel.
solution:
check if a be_user is logged in and use the timetrack object only when this is the case. Then wrap each call to a method of $GLOBALS['TT'] in a condition which checks if the global var $USE_TIMETRACK is set.
that works great and results in cached pages rendered 5% faster (see benchmarks below)
info:
the tt object itself is still initialized forbackwards compatibility: it could be needed by extensions which expect it to be initialized
benchmark results:
siege -c 15 -i -b -t 2M -f urls43_perf.txt
trunk
-------------------------------------------------------------
Transactions: 32354 hits
Availability: 100.00 %
Elapsed time: 120.46 secs
Data transferred: 790.16 MB
Response time: 0.06 secs
Transaction rate: 268.59 trans/sec
Throughput: 6.56 MB/sec
Concurrency: 14.97
Successful transactions: 32354
Failed transactions: 0
Longest transaction: 0.53
Shortest transaction: 0.00
patched
-------------------------------------------------------------
Transactions: 34167 hits
Availability: 100.00 %
Elapsed time: 120.48 secs
Data transferred: 834.85 MB
Response time: 0.05 secs
Transaction rate: 283.59 trans/sec
Throughput: 6.93 MB/sec
Concurrency: 14.97
Successful transactions: 34167
Failed transactions: 0
Longest transaction: 0.41
Shortest transaction: 0.00
trunk = 100%
patched = 105.5%
(issue imported from #M11535)
Files
Updated by Rupert Germann over 15 years ago
the second patch has stripped whittespaces for better reading
Updated by Rupert Germann over 15 years ago
the benchmark results of both patches are virtually the same.
calling empty methods seems to be as expensive as processing a lot of if() conditions.
but Ingo's patch is simply the more elegant solution and so I
draw back RFC 11535 in favour of 9657 (which does not seem to have been published in this list until now).