I measured run time for my page and noticed that the function getBaseCurrencyCode() takes over a second to run. All of my caching are enabled.
I examined the function and saw that the following command:
takes over a second.
but when I use the
it takes milliseconds
can anyone tell me why is this time difference occurs ?
Although I’ve tried the suggested solutions you offered but still there are massive time gaps. I would be happy if you can try and measure the time it takes for you to run the getConfig function and post it here.
I tried measure the time this function takes by wrapping this code with microtime functions
i.e on local path :
instead of this line :
$configValue = $this->getConfig(Mage_Core_Model_Store::XML_PATH_PRICE_SCOPE);
I replaced it with this code (same code with microtime):
$start = microtime(true); $configValue = $this->getConfig(Mage_Core_Model_Store::XML_PATH_PRICE_SCOPE); $time_elapsed_secs = microtime(true) - $start; echo "function: getConfig() took me: " . $time_elapsed_secs . " sec<br />"; die;
my output was:
function: getConfig() took me: 1.1326711177826 sec
I would be happy to see your output and runtime.