View Issue Details

IDProjectCategoryView StatusLast Update
0001713OXID eShop (all versions)1.01. Products (product, categories, manufacturer, promotions etc.)public2012-12-07 14:13
Reporteravenger Assigned To 
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.2.0 revision 23610 
Fixed in Version4.4.7 revision 33396 
Summary0001713: Preparing the catgeory-tree massively degrades shop responsetimes
DescriptionIn a Shop width 300 categories only "buildTree"-profiling shows 2.3 seconds for this function, bringing the shop responsetime up to 3.3 seconds....

It is very strange, that this function swallows so much time, and simply not acceptable.

On the other hand, this function ist needed to build sophisticated navigation menues (horizontal or vertical CSS-flyout or -tabbed menues), so you just can't disable the function when using such menues.
Additional InformationSeems to me that the "buidtree"-routine is totally over the top....

For these purposes (searching and menu-building) you don't really need each category entry as an object with the inherent massive overhead.

It would be sufficient, to have an array, which holds cat-name, cat-link and cat-level, cat-? only.

It would be highly desirable, if the category tree could even be returned as a fully prepared "ul/li"- and/or "select"-structure.

And if this tree was generated directly from the database instead of using the zillion objects involved, this should be available in no time....
TagsCategory
Theme
BrowserAll
PHP Versionany
Database Versionany

Activities

marco_steinhaeuser

2010-03-23 13:18

reporter   ~0002422

Discussion about it (in German)
http://www.oxid-esales.com/forum/showthread.php?t=4675

Get back to me if need help with translations.

avenger

2010-03-30 08:05

reporter   ~0002446

Last edited: 2010-03-30 08:07

I have tentatively implemented the cat-dropdown-box creation by directly building the cat-tree from the "oxcategories" table, not using any objects....

This takes only 48 milliseconds(!) instead of the 2,3 seconds (2300 milliseconds) for the standard OXID way for 380 categories....

Which is approx. 50 times faster, and hence usable also for large numbers of categories....

And it also requires ony tiny amounts of memory...

sarunas_valaskevicius

2011-01-28 11:33

reporter   ~0004024

I could not reproduce the numbers (performance measurement) in forum, still found and fixed a performance issue, causing to slow down the building of the cat. tree in case there is a lot of inactive categories (performance increase for those situations is >400%, shops without inactive categories are unaffected).

Other than that, for update release (4.5.0) - loading and sorting is reworked, to select categories only once from DB by also moving sorting functionality there. general performance increase for loading cat. tree - 30% (starting from v4.5.0)