Openbravo Issue Tracking System - Retail Modules
View Issue Details
0033211Retail ModulesWeb POSpublic2016-06-09 18:122016-06-17 09:21
gorkaion 
gorkaion 
highminorhave not tried
closedfixed 
5
pi 
pi 
marvintm
No
0033211: Bad performance of ProductListEventHandler evenhandler
This event handler populates the Product Category list of an assortment when products are added to it.

It checks that the new product's category is not already included and add it in case it is necessary.

The process is not considering high volumes of product categories and can be optimized.
Remove unneeded list() and loops by single HQL query.
No tags attached.
Issue History
2016-06-09 18:12gorkaionNew Issue
2016-06-09 18:12gorkaionAssigned To => gorkaion
2016-06-09 18:12gorkaionTriggers an Emergency Pack => No
2016-06-09 18:13gorkaionReview Assigned To => marvintm
2016-06-09 18:17hgbotCheckin
2016-06-09 18:17hgbotNote Added: 0087145
2016-06-09 18:17hgbotStatusnew => resolved
2016-06-09 18:17hgbotResolutionopen => fixed
2016-06-09 18:17hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/b165e55e3afcd7975df2624a25140569cbc086b1 [^]
2016-06-17 09:21marvintmStatusresolved => closed

Notes
(0087145)
hgbot   
2016-06-09 18:17   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: b165e55e3afcd7975df2624a25140569cbc086b1
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Thu Jun 09 18:16:49 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/b165e55e3afcd7975df2624a25140569cbc086b1 [^]

Fixed issue 33211.Fix performance issues.

- Changed loop through existing categories by a single query.
- Do not load in memory objects if it is not necessary by using Proxies.
- Create a new addProductCategoryToAssortment method to avoid duplicated code.

---
M src/org/openbravo/retail/posterminal/event/ProductListEventHandler.java
---