View Issue Details

IDProjectCategoryView StatusLast Update
0002674OXID eShop (all versions)4.05. Performancepublic2012-12-10 13:29
Reporterfanatique Assigned To 
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.4.6 revision 32697 
Fixed in Version4.5.1 revision 38045 
Summary0002674: aList::getAttributes() is computed for each call
DescriptionaList::getAttributes() takes about 3 seconds per call in a shop with 300.000+ articles in one category and the value is not stored during a request.

As the method is called more then once per request this leads to up to something like 7 seconds delay rendering an article list.

It'd be good to at least store the value in some sort of registry over a request. Apart from that t might be a god idea to prefetch this and not commit it during the request itself.
TagsPerformance
ThemeBoth
BrowserAll
PHP Version5.3
Database Version5.1

Activities

birute_meilutyte

2011-05-06 13:33

reporter   ~0004500

@developers: check from source code side if such issue still exist

leofonic

2011-06-24 19:27

reporter   ~0004770

Small module maybe useful for older versions:
<?php
class cached_alist extends cached_alist_parent{
    public function getAttributes()
    {
        //implement caching
        if (!is_array($this->_aAttributes)){
            if (!is_array($this->_aAttributes = parent::getAttributes())){
                $this->_aAttributes = array();
            }
        }
        return $this->_aAttributes;
    }
}

Arunas

2011-06-27 15:57

reporter   ~0004773

fixed, added an instance caching mechanism for the oxCategory::getAttributes() method.