Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029319Openbravo ERP04. Warehouse managementpublic2015-03-17 16:252015-05-12 17:40
ngarcia 
aferraz 
urgentmajoralways
closedfixed 
5
 
3.0PR15Q3 
eduardo_Argal
Core
No
0029319: Performance Problems on the process of Validating a Costing Rule
Performance Problems on the process of Validating a Costing Rule. The query of the checkTransactionsWithMovDateInClosedPeriod function of the CostingRuleProcessOnProcessHandler class takes too much time
In an environment with lots of transaction without cost calculated (116405 in our example)
As group admin role:
   Validate a new Costing Rule
   Check it takes too much time (35 minutes in our example)
No tags attached.
Issue History
2015-03-17 16:25ngarciaNew Issue
2015-03-17 16:25ngarciaAssigned To => umartirena
2015-03-17 16:25ngarciaModules => Core
2015-03-17 16:25ngarciaResolution time => 1428703200
2015-03-17 16:25ngarciaTriggers an Emergency Pack => No
2015-03-17 16:26ngarciaIssue Monitored: networkb
2015-03-17 16:39heccamIssue Monitored: heccam
2015-05-04 09:20aferrazAssigned Toumartirena => aferraz
2015-05-04 13:48aferrazStatusnew => scheduled
2015-05-05 13:23aferrazNote Added: 0077008
2015-05-12 11:08hgbotCheckin
2015-05-12 11:08hgbotNote Added: 0077329
2015-05-12 11:08hgbotStatusscheduled => resolved
2015-05-12 11:08hgbotResolutionopen => fixed
2015-05-12 11:08hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/cd9a5d049ffbfaa5236d30b9537d7df2ee9f8223 [^]
2015-05-12 11:08hgbotCheckin
2015-05-12 11:08hgbotNote Added: 0077330
2015-05-12 11:10aferrazReview Assigned To => eduardo_Argal
2015-05-12 11:10aferrazNote Added: 0077331
2015-05-12 11:10aferrazStatusresolved => closed
2015-05-12 11:10aferrazFixed in Version => 3.0PR15Q3
2015-05-12 17:40hudsonbotCheckin
2015-05-12 17:40hudsonbotNote Added: 0077350
2015-05-12 17:40hudsonbotCheckin
2015-05-12 17:40hudsonbotNote Added: 0077351

Notes
(0077008)
aferraz   
2015-05-05 13:23   
Test plan:

In an environment with lots of transaction without cost calculated (116405 in our example)
As group admin role:
   Validate a new Costing Rule
   Check it does not take too much time (less than 2 seconds)
(0077329)
hgbot   
2015-05-12 11:08   
Repository: erp/devel/pi
Changeset: cd9a5d049ffbfaa5236d30b9537d7df2ee9f8223
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue May 05 13:26:14 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/cd9a5d049ffbfaa5236d30b9537d7df2ee9f8223 [^]

Fixes issue 29319: Performance problems validating a Costing Rule

Query in checkTransactionsWithMovDateInClosedPeriod method of CostingRuleProcessOnProcessHandler class, which has performance problems, has been changed.
Now M_Transaction.movementdate are truncated and grouped in order to have only one record per day instead of one record per transaction, which enhance a lot the performance of the query.
The query has been created in XSQL, because subquerys in FROM statement in HQL are not supported.

---
M src/org/openbravo/costing/CostingRuleProcessOnProcessHandler.java
M src/org/openbravo/costing/CostingUtils_data.xsql
---
(0077330)
hgbot   
2015-05-12 11:08   
Repository: erp/devel/pi
Changeset: e8b37e1f86397afcd9322e313afe4c07fda7afb9
Author: Eduardo Argal Guibert <eduardo.argal <at> openbravo.com>
Date: Mon May 11 19:21:58 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e8b37e1f86397afcd9322e313afe4c07fda7afb9 [^]

Related to issue 29319: Performance Problems on the process of Validating a Costing Rule
Some code refactoring after code review

---
M src/org/openbravo/costing/CostingRuleProcessOnProcessHandler.java
M src/org/openbravo/costing/CostingUtils_data.xsql
---
(0077331)
aferraz   
2015-05-12 11:10   
Code review + Testing done by eduardo-Argal OK
(0077350)
hudsonbot   
2015-05-12 17:40   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/6d9fee60cdbd [^]
Maturity status: Test
(0077351)
hudsonbot   
2015-05-12 17:40   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/6d9fee60cdbd [^]
Maturity status: Test