Speed Optimization by disabling Mage_Reports module?

Your store might work, that's true, as long as you have admin panel Graphs also disabled. In reality though it's all up to programmers and how they're handling situations with modules being disabled. The issue is, that Magento 1.x does not have a handling mechanism that would automatically solve that problem for you. If you look at

public function getResourceModelInstance($modelClass='', $constructArguments=array())
{
    $factoryName = $this->_getResourceModelFactoryClassName($modelClass);
    if (!$factoryName) {
        return false;
    }
    return $this->getModelInstance($factoryName, $constructArguments);
}

it will return false when module is disabled. Which means all Mage::getModel('reports/.. will be false and whatever method you'll try to call on that (supposed to be) object will throw you a Call to a member function on a non-object php Fatal error.

While Magento team did their job done (well, they didn't actually, if you enable Charts your admin should break on Dashboard for example), you can't know how 3rd party extensions will handle those situations in case they try to use the Reports module.

So, if you make sure you're handling all the situations where reports are called, then you can disable it. Otherwise, better not to.


I can't tell you what will happen if you disable the module but I can tell you how you can (likely) stop its processing impact without disabling it.

All of its processing cost comes from observers. And probably a Xeon job but that isn't relevant here. If you can stop the observing of the events you can eliminate the overhead.

The naive way would be to edit the config.xml and comment them out. Don't do that.

The right way would be to create your own module that depends on Mage_Reports and just have a config.xml. In that define a front end tag and copy in all the observers from Mage_Reports. Then change the event they are observing to some nonsense not real event that will never get fired. Then add a tag under the observer named type with a value of disabled.

If you look in dispatch event in App.php you will be able to see that it works. You overwrite theirs with a disabled observer. Nothing gets called and nothing breaks!