RSS Feed/News XF/AddOn/Manager::coerceAddOnId causes performance issues with large number of add-ons

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
28,417
Points
823

Reputation:

The XF/AddOn/Manager::coerceAddOnId() function repeatedly calls XF/AddOn/Manager::getAvailableAddOnIds() (which is itself relatively slow) and performs repeated array transformations. This leads to a significant performance bottleneck, especially noticeable during active add-on cache rebuilds.

PHP:

Code:
protected function coerceAddOnId($addOnId)
{
    $addOnIds = $this->getAvailableAddOnIds();

$index = array_search(strtoupper($addOnId), array_map('strtoupper', $addOnIds))...

Read more

Continue reading...
 
Status
Not open for further replies.
Top