My store was extremely slow on the product pages and after a little bit of debugging I found that the product swatches were causing the problem.

I've checked the server error log and the max_execution_time exceeds with the following code snippets:


public static function normalizeKey($key) {
    if (function_exists('mb_strtolower')) {
        return trim(mb_strtolower($key, 'UTF-8')); // The line the error refers to
    return trim(strtolower($key));


$optionLabels = array_map(function ($value) {
    return array_map('Mage_ConfigurableSwatches_Helper_Data::normalizeKey', $value); // Error
}, $optionLabels);

My client does prefer to have the swatches enabled on the site and the swatches are used for three attributes, but how can I solve the executing time problem or just generally speed up the swatches?

I'm using Magento 1.9.1 with the default swatches and the site runs on an nGinx server

2 Answers 2


There are many performance issues with the swatches. Try my module https://github.com/wigman/AjaxSwatches. It takes out the swatches and loads them using Ajax.


i've found the following solution Enterprise 1.14.1 Swatches causing 35 sec plus load time on category pages and it reduced the loading time of the page with 10 seconds

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.