-
Bug
-
Resolution: Fixed
-
3.0.x
-
None
-
PHP Environment:
Database:
append_sid() was another function that really stood out when running phpBB profile data through Kcachegrind. On a viewtopic.php page it uses approx 20% of the page time. I've been able to reduce this to 10% by introducing this code at the top of the function:
// Handle really simple cases quickly
|
if ($_SID == '' && $session_id === false && empty($_EXTRA_URL) && !is_array($params))
|
{
|
return $url . ($params !== false ? '?'. $params : '');
|
}
|
This covers the majority of calls to append_sid(). Call time can be further reduced to approx 6% by caching (static var) if there is a relevant hook available.