View Issue Details

IDProjectCategoryView StatusLast Update
0004980OXID eShop (all versions)4.05. Performancepublic2013-06-23 19:13
Reporterdennishei 
PriorityhighSeveritycriticalReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.7.3 / 5.0.3 revision 54408 
Target Version4.8.0_5.1.0_beta1Fixed in Version4.7.5 / 5.0.5 
Summary0004980: buildTree / assignArray very slow
DescriptionWe have 1.320 rows in oxcategories (some are deactivated but have to stay in db)....

mysql select query is very fast:
/* Affected rows: 0 Gefundene Zeilen: 1.320 Warnungen: 0 Dauer von 1 query: 0,000 sec. (+ 0,016 sec. network) */

if i debug in oxid:
Profile buildTree: 0.87755s 2961.7% 1 * 0.87755s

Problem seems to be:
oxlist->assignArray

in oxcategories we have "normal" shop seo content for the categories in oxlongdesc.

it looks like that oxid gets ALL fields (also oxlongdesc) for buildung the tree menu on every call.....

i think it does not make sense to load all coloumns for building the tree menu...

This seems to be the performance killer nr.1 in our EE 5.0.3....
Steps To Reproduceget my oxcategories.sql an have a look what happens....
TagsNo tags attached.
ThemeBoth
BrowserAll
PHP Version5.3
MySQL Version5.5

Relationships

related to 0005804 acknowledgedflorian.auer Performance option "Do not display empty Categories" has side effects 

Activities

dennishei

2013-03-06 23:17

reporter   ~0008483

just cleaned for testing oxlongdesc.

it does not affect performance. it is also slow with no content in oxlongdesc....

dennishei

2013-03-06 23:23

reporter   ~0008484

commenting out:
$this->_ppRemoveInactiveCategories();

brings 0,3 sek performance boost to:
Profile buildTree: 0.57923s 1114.79% 1 * 0.57923s

but 0,57 sek for buildTree is also too slow.....

dennishei

2013-03-06 23:29

reporter   ~0008485

$this->_blForceFull = false;

==> Profile buildTree: 0.04802s 187.65% 1 * 0.04802s

TOP Performance... This must be the target :-)

But no DropDowns Items any more in the topmenu (azure) except active category.....
so this is not what i can do.... :-)

Linas Kukulskis

2013-03-07 09:49

reporter   ~0008486

Reminder sent to: dennishei

hi, can you attach your category table sql dump?

Linas Kukulskis

2013-03-07 15:59

reporter   ~0008489

Reminder sent to: dennishei

do you test on azure theme? do you on your custom theme always select all categories and build from it trees?

dennishei

2013-03-08 12:27

reporter   ~0008492

Please contact me via email to send you my table.
I don't like to send my SEO Text Categories to this public place :-)

Otherwise every Luggage Shop in Germany would have our Content :-)

Linas Kukulskis

2013-03-14 14:27

reporter   ~0008506

in most cases to load all tree not needed. more often use case is use 2 levels of the tree etc. so fix can be extend oxcategorylist class to get 2 level trees or so.

Linas Kukulskis

2013-04-02 13:33

reporter   ~0008552

fixed, added functionality by default load only 2 levels as it was in prev version

dennishei

2013-05-24 10:51

reporter   ~0008716

The Fix seems to make Problems: http://forum.oxid-esales.com/showthread.php?p=124296#post124296

ray

2013-05-24 11:00

reporter   ~0008717

Actually the fix has some side effects, see the thread Dennis has linked to.

One possibility would be to re-enable the blLoadFullTree in oxconfig and implement again in admin within "Performace"-Tab.
Ore, maybe better, to allow the shop owner to specify the number of levels loaded by default.

ray

2013-05-24 11:48

reporter   ~0008718

have a look at demoshop http://demoshop.oxid-esales.com/professional-edition/Bekleidung/

existing subcategories are not shown any more at "Sportswear" and "Fashion" - despite the template code wants to show them:

[{if $category->getHasVisibleSubCats()}]
 ...
 [{foreach from=$category->getSubCats() item=subcategory}]
 ...
 [{/foreach}]
 ...
 [{/if}]

please check here within a 4.5 demo installation how it was intended:
http://oxid-tpl-debug.stahlwarenhaus-hebsacker.de/azure/Bekleidung/

Linas Kukulskis

2013-05-24 12:47

reporter   ~0008719

with a bug fix was introduces new getters please use them before tree generation to setup tree

oxCategoryList::setLoadFull() and oxCategoryList::getLoadFull();
oxCategoryList::setLoadLevel() and oxCategoryList::getLoadLevel();