When Credit rating disabled there is a method 'setCreditratingSampleCounter' that still doing 'saveConfig' and produces unnecessary DB queries on every order place after.
It could simply be improved if you check if Credit Rating is enabled:
public function setCreditratingSampleCounter($count, $storeId)
{
$creditRating = $this->getConfigProtect($storeId)->getCreditrating();
if ($creditRating->isEnabled()) {
Mage::getConfig()->saveConfig(self::CONFIG_KEY_CREDITRATING_SAMPLE_COUNTER, $count, 'stores', $storeId);
}
}
When Credit rating disabled there is a method 'setCreditratingSampleCounter' that still doing 'saveConfig' and produces unnecessary DB queries on every order place after.
It could simply be improved if you check if Credit Rating is enabled: