Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Performance: PHP 5.3 slower than 5.2 / “return $this;” takes 27 seconds
 
klausherzberg
Member
 
Total Posts:  70
Joined:  2008-10-20
 

Hi,
some days ago we switched from PHP 5.2 to 5.3 on some servers of our cluster.

We noticed that complex layered navigation using URLs takes longer than before.

Example: An request with 4 params like

yxz.html?color=123&sale;=234&size;=345&type;=456

takes 20 seconds with PHP 5.2. (not cached). This is not fast, but we have many products and it is magento smile

With PHP 5.3 the same request takes 45 seconds. What???

Using profiler we picked the following part to inspect:

PHP 5.3:
__EAV_COLLECTION_AFTER_LOAD__ 27.6165 seconds

PHP 5.2
_EAV_COLLECTION_AFTER_LOAD__ 10.2009 seconds

Take a look to the code:

app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php

Row 805

Varien_Profiler::start('__EAV_COLLECTION_AFTER_LOAD__');
$this->_afterLoad();
Varien_Profiler::stop('__EAV_COLLECTION_AFTER_LOAD__');

=

protected function _afterLoad()
{
    
return $this;
}

I commented

// $this->_afterLoad();

and this increased the whole 27.6165 seconds

Can someone explain, why

a)
does

return $this;

takes so long in general?

b)
PHP 5.3 is slower than 5.2 ???

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top