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

There is a bug in this version
P

Painbaker

Guest
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...