Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0029131
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Modules] Warehouse Pickingmajorhave not tried2015-03-04 16:432015-04-09 11:28
ReporteregoitzView Statuspublic 
Assigned Toeduardo_Argal 
PriorityimmediateResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisione8a78f938850
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Regression date
Regression introduced by commit
Regression level
Review Assigned Todmiguelez
Regression introduced in release
Summary

0029131: Bad performance and degradation on the execution on the generate picking list process

DescriptionThe process takes long becuase each generation takes long due to the memory usage.
There is also degradation and the time for each execution of the loop increases.

Steps To Reproduce-Execute the process Generate picking list for a order with 2600 lines.
Proposed SolutionOn the method processOrder from Utilities java class you can replace the
loop
for (OrderLine orderLine : order.getOrderLineList()) {

with

a loop that reads all the id's obtained with a query object:

    final StringBuilder hqlString = new StringBuilder();
    hqlString.append(" select e.id ");
    hqlString.append(" from OrderLine as e");
    hqlString.append(" where e.salesOrder.id = :order");
    Query query = OBDal.getInstance().getSession().createQuery(hqlString.toString());
    
    query.setParameter("order", order.getId());
    
    List<String> stroLines = query.list();
    
    
   
    for ( String strline : stroLines ) {
        OrderLine orderLine = OBDal.getInstance().get(OrderLine.class, strline)


That improves a lot the performance of each execution but does not solve the degradation problem.

TagsPerformance
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0029177 closededuardo_Argal The sequence for picking list on ad_sequence table is locked while the picking list process is executed 

-  Notes
(0075162)
egoitz (manager)
2015-03-04 17:15

On the utilities class
replacing
 CallStoredProcedure.getInstance().call("M_GET_STOCK_PARAM", params, null, true, true);
with
 CallStoredProcedure.getInstance().call("M_GET_STOCK_PARAM", params, null, false, true);

 improves the performance.
The change removes the flush and i think that can be done because other flushes are done when changes are done.
In any case that improves performance on the first executions but due to the degradation does not solve the problem.
(0075371)
hgbot (developer)
2015-03-10 11:24

Repository: erp/pmods/org.openbravo.warehouse.pickinglist
Changeset: e8a78f938850a44a0922ac2d70252ae786d14147
Author: Eduardo Argal Guibert <eduardo.argal <at> openbravo.com>
Date: Tue Mar 10 11:24:01 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.pickinglist/rev/e8a78f938850a44a0922ac2d70252ae786d14147 [^]

Fixes issue 29131
Bad performance and degradation on the execution on the generate picking list process.
Changed object loop to string loop and chnages ad_sequence retrieval to avoid contention

---
M src/org/openbravo/warehouse/pickinglist/CreateActionHandler.java
M src/org/openbravo/warehouse/pickinglist/Utilities.java
---
(0075444)
hgbot (developer)
2015-03-11 10:53

Repository: erp/pmods/org.openbravo.warehouse.pickinglist
Changeset: 346fac4a867b907e8f1c12d5b7a163fc8d82447f
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Wed Mar 11 15:23:38 2015 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.pickinglist/rev/346fac4a867b907e8f1c12d5b7a163fc8d82447f [^]

Related to issue 29131. Fixes wrong success message shown.
It was showing completed PickLists as not completed.

---
M src/org/openbravo/warehouse/pickinglist/Utilities.java
---
(0076408)
dmiguelez (developer)
2015-04-09 11:28

Code Review + Testing OK

- Issue History
Date Modified Username Field Change
2015-03-04 16:43 egoitz New Issue
2015-03-04 16:43 egoitz Assigned To => naiaramartinez
2015-03-04 16:43 egoitz Resolution time => 1428444000
2015-03-04 16:43 egoitz Tag Attached: Performance
2015-03-04 16:44 egoitz Assigned To naiaramartinez => Sandrahuguet
2015-03-04 17:15 egoitz Note Added: 0075162
2015-03-04 17:34 egoitz Resolution time 1428444000 => 1425942000
2015-03-04 17:34 egoitz Priority urgent => immediate
2015-03-04 17:56 Sandrahuguet Assigned To Sandrahuguet => umartirena
2015-03-06 15:36 egoitz Relationship added related to 0029177
2015-03-10 11:24 hgbot Checkin
2015-03-10 11:24 hgbot Note Added: 0075371
2015-03-10 11:24 hgbot Status new => resolved
2015-03-10 11:24 hgbot Resolution open => fixed
2015-03-10 11:24 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.pickinglist/rev/e8a78f938850a44a0922ac2d70252ae786d14147 [^]
2015-03-11 10:53 hgbot Checkin
2015-03-11 10:53 hgbot Note Added: 0075444
2015-03-23 13:41 Sandrahuguet Assigned To umartirena => eduardo_Argal
2015-04-09 11:28 dmiguelez Review Assigned To => dmiguelez
2015-04-09 11:28 dmiguelez Note Added: 0076408
2015-04-09 11:28 dmiguelez Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker