View Issue Details

IDProjectCategoryView StatusLast Update
0003330OXID eShop (all versions)4. ------ eShop Core -------public2012-12-10 13:42
Reporterarvydas_vapsva 
PriorityurgentSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.5.4 revision 39463 
Target Version4.5.4 revision 39463Fixed in Version4.5.10 revision 44222 
Summary0003330: Some code/queries can be optimized
DescriptionSome code/queries can be optimized:
- oxArticle::_hasAnyVariant() - if product from same shop as active - do not query DB for variant count, use "oxvarcount" field value;
- oxConfig::getShopConfVar() - if requested variable for same shop as active in session - call oxConfig::getConfigParam() instead of querying db;
- oxSeoEncoder::_loadFromDb() - implement per view cache (non admin) to avoid unnecessary DB queries. Cache must be reset on related data changes. Thus will be saved hundred of queries;
- oxVatSelector::_getVatForArticleCategory() - add cache for category id select, thus will be saved additional 19 or so queries per list view;

TagsNo tags attached.
ThemeBoth
BrowserAll
PHP Versionany
MySQL Versionany

Activities

arvydas_vapsva

2011-11-02 14:57

reporter   ~0005355

EE oxSuperCfg::getRights() is now:

        $iMode = (int) $this->getConfig()->getConfigParam( 'blUseRightsRoles' );
        if ( $iMode && self::$_oRights == null ) {
            if ( $this->isAdmin() && ( $iMode & 1 ) ) {
                // checking if back-end RR control is on
                self::$_oRights = oxNew ( 'oxadminrights' );
                self::$_oRights->load();
            } elseif ( !$this->isAdmin() && $iMode & 2 ) {
                // checking if front-end RR control is on
                self::$_oRights = oxNew ( 'oxrights' );
                self::$_oRights->load();
            }
        }

could be:

        $iMode = (int) $this->getConfig()->getConfigParam( 'blUseRightsRoles' );
        if ( $iMode && self::$_oRights === null ) {
            self::$_oRights = false;
            if ( $this->isAdmin() && ( $iMode & 1 ) ) {
                // checking if back-end RR control is on
                self::$_oRights = oxNew ( 'oxadminrights' );
                self::$_oRights->load();
            } elseif ( !$this->isAdmin() && $iMode & 2 ) {
                if ( oxDb::getDb()->getOne( "select 1 from oxobjectrights" ) ) {
                    // checking if front-end RR control is on
                    self::$_oRights = oxNew ( 'oxrights' );
                    self::$_oRights->load();
                }
            }
        }

marco_steinhaeuser

2012-03-22 10:42

administrator   ~0006064

According to this German blog post
http://www.shoptimax.de/blog/technisches/seo-cachefiles-im-tmp-ordner/

the bug was fixed by caching the database queries to /tmp/ folder.

This cannot be the correct way as loads of files will be generated which can become relevant on hosted web space and for I/O performance. Please find another solution.

Linas Kukulskis

2012-04-19 09:48

reporter   ~0006336

added shop config option to enable disable seo cache