Magento Forum

   
Performance adding quoteitem to wishlist
 
mittax
Jr. Member
 
Total Posts:  1
Joined:  2010-03-24
 

Good evening together,

We had the problem, that the adding of a quoteitem to the wishlist takes 12 seconds on a database with 2500 products. Thats pretty long i think. In case of performance its a real problem to wait that time and display preloaders.

Following hack isnt realy a solution, but it reduces loadingtime from 12 seconds to 3

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Solution\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"

Mage_Wishlist_Model_Wishlist:::getItemCollection()

replace
/**
* Retrieve wishlist item collection
*
* @return Mage_Wishlist_Model_Mysql4_Item_Collection
*/
public function getItemCollection()
{
if (is_null($this->_itemCollection)) {
/** @var $currentWebsiteOnly boolean */
$currentWebsiteOnly = !Mage::app()->getStore()->isAdmin();
$this->_itemCollection = Mage::getResourceModel(\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’wishlist/item_collection\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’)

->addWishlistFilter($this)
->addStoreFilter($this->getSharedStoreIds($currentWebsiteOnly))
->setVisibilityFilter();
}

return $this->_itemCollection;
}
-----------------------------------------------------------------------------------------------------------------------------
with

/**
* Retrieve wishlist item collection
*
* @return Mage_Wishlist_Model_Mysql4_Item_Collection
*/
public function getItemCollection()
{
if (is_null($this->_itemCollection)) {
/** @var $currentWebsiteOnly boolean */
$currentWebsiteOnly = !Mage::app()->getStore()->isAdmin();
$this->_itemCollection = Mage::getResourceModel(\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’wishlist/item_collection\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’)

/**
* pbo performance deactivated
*/
//->addWishlistFilter($this)
->addStoreFilter($this->getSharedStoreIds($currentWebsiteOnly))
->setVisibilityFilter();
}

return $this->_itemCollection;
}

Problem seems to be the wishlistfilter.

It would be nice if varian can bring up a real filter solution.

Thank you

Peter

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