Openbravo Issue Tracking System - Retail Modules
View Issue Details
0034494Retail ModulesWeb POSpublic2016-11-14 14:102017-02-09 12:02
adrianromero 
adrianromero 
urgentmajorhave not tried
closedfixed 
5
 
RR17Q1 
marvintm
No
0034494: Category Tree performance issue
The Category tree in Web POS is very slow when expanding a parent category in a tree that has a high number of categories to display.

The technical problem is that the list component used when expanding a parent category, each insertion in the tree of each son category fires a full rebuild of the tree.
* Create a category tree with a high number of parent categories and son categories.
* Login in to webPOS and go to the search tab
* Open the category tree dialog
* Tap on a category with a high number of son categories and that is not the last category listed. Observe it takes minutes to expand the tree.
See attached patch
No tags attached.
has duplicate defect 0034337 closed ranjith_qualiantech_com Performance issue in Category Tree dialog trying to show subcategories, more than 100. 
patch CategoryTreePerformanceIssue.patch (1,430) 2016-11-15 09:20
https://issues.openbravo.com/file_download.php?file_id=10045&type=bug
Issue History
2016-11-14 14:10adrianromeroNew Issue
2016-11-14 14:10adrianromeroAssigned To => Retail
2016-11-14 14:10adrianromeroTriggers an Emergency Pack => No
2016-11-15 09:20adrianromeroFile Added: CategoryTreePerformanceIssue.patch
2016-11-15 09:24adrianromeroNote Added: 0091529
2016-11-15 09:26adrianromeroNote Added: 0091531
2016-11-15 09:27adrianromeroReview Assigned To => marvintm
2016-11-17 10:04hgbotCheckin
2016-11-17 10:04hgbotNote Added: 0091620
2016-11-17 10:04hgbotStatusnew => resolved
2016-11-17 10:04hgbotResolutionopen => fixed
2016-11-17 10:04hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/8fccd642dda61d9a4af31b6e1666f6de7d0efa76 [^]
2016-11-17 13:27hgbotCheckin
2016-11-17 13:27hgbotNote Added: 0091631
2016-11-17 13:27hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/8fccd642dda61d9a4af31b6e1666f6de7d0efa76 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/25320cf9f9b9503f3fff4ed10fe2cd2693206145 [^]
2016-11-17 13:28adrianromeroNote Added: 0091632
2016-11-23 13:47marvintmStatusresolved => closed
2016-11-23 13:47marvintmFixed in Version => RR17Q1
2016-11-23 13:48marvintmAssigned ToRetail => adrianromero
2017-01-18 11:46ranjith_qualiantech_comRelationship addedhas duplicate 0034337
2017-02-09 12:02hgbotCheckin
2017-02-09 12:04hgbotNote Added: 0094172

Notes
(0091529)
adrianromero   
2016-11-15 09:24   
The proposed patch modifies how to insert into the tree list the set of son categories. this way instead of using the "add" method that internally fires one rebuild of the whole tree for each element added it just rebuilds the tree one time for all elements added.

It has been explored also to modify internally the behaviour of the tree in order to not to rebuild the whole tree when adding one element in the middle of the tree but we have not found the way to do it properly in Enyo. Enyo only allows to create components at the end of a parent.
(0091531)
adrianromero   
2016-11-15 09:26   
Attached patch successfully passes try: http://ci.openbravo.com/view/try-retail/job/try-ret-init/6273/ [^]
(0091620)
hgbot   
2016-11-17 10:04   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 8fccd642dda61d9a4af31b6e1666f6de7d0efa76
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Mon Nov 14 14:48:50 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/8fccd642dda61d9a4af31b6e1666f6de7d0efa76 [^]

Fixes issue 0034494: Category Tree performance issue
* Insert component in createComponent() enyo function

---
M web/org.openbravo.mobile.core/source/component/ob-scrollabletable.js
---
(0091631)
hgbot   
2016-11-17 13:27   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 25320cf9f9b9503f3fff4ed10fe2cd2693206145
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Thu Nov 17 13:26:52 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/25320cf9f9b9503f3fff4ed10fe2cd2693206145 [^]

Fixes issue 0034494: Category Tree performance issue
* Inserts all components at a time inside the list instead of one by one

---
M web/org.openbravo.mobile.core/source/retail/component/ob-retail-product-browser.js
---
(0091632)
adrianromero   
2016-11-17 13:28   
first changeset backed out: https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/a676b64319c1 [^]
(0094172)
hgbot   
2017-02-09 12:02   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: a7c1c0191cd36a2ae230d1f6375b9e4c4b26b189
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Thu Feb 09 12:01:07 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/a7c1c0191cd36a2ae230d1f6375b9e4c4b26b189 [^]

Related to issue 0034494: Category Tree performance issue
This function allows automated tests do check whether a node is expanded or not

---
M web/org.openbravo.retail.posterminal/js/components/rendercategory.js
---