View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000816 | OXID eShop (all versions) | 4.09. SEO, SEO URL | public | 2009-04-22 09:35 | 2012-12-10 13:35 |
Reporter | dainius.bigelis | Assigned To | |||
Priority | high | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 4.1.0 revision 17976 | ||||
Fixed in Version | 4.1.1 revision 18442 | ||||
Summary | 0000816: Huge amount of cycles executed for removing duplicated META keywords | ||||
Description | When there are lot of words in the META keywords (i.e. few thousands keywords), the function for removing duplicated keywords runs huge amount of cycles (can be few hundred of thousands). It slows down the page significantly. Fix this place to solve the removing duplicated entries in other way, to improve performance. | ||||
Tags | No tags attached. | ||||
Theme | |||||
Browser | All | ||||
PHP Version | 5.2.6 | ||||
Database Version | 5.0.33 | ||||
|
In oxUbase::_removeDuplicatedWords changed this foreach: foreach ( $aStrings as $iANum => $sAString ) { $sAString = $oStr->strtolower( $sAString ); foreach ( $aStrings as $iBNum => $sBString ) { // duplicates $sBString = $oStr->strtolower( $sBString ); if ( $sAString && $iANum != $iBNum && strcmp( $sAString, $sBString ) === 0 ) { unset( $aStrings[$iANum] ); } } } to this code: $sCount = count($aStrings); for ( $iNum = 0; $iNum < $sCount; $iNum++ ) { $aStrings[$iNum] = $oStr->strtolower( $aStrings[$iNum] ); } // duplicates $aStrings = array_unique($aStrings); |