Openbravo Issue Tracking System - Modules
View Issue Details
0042430ModulesAdvanced Warehouse Operationspublic2019-11-28 10:252019-12-12 23:01
dmiguelez 
dmiguelez 
normalminoralways
closedfixed 
5
 
 
dmiguelez
0042430: Improve performance in Task Generation Process and in Task Confirmation Process
The performance is this two processes, Task Generation and Task Confirmation is acceptable for individual Tasks.

However, when this processes are run by another process that calls them several times, it takes quite some time.

It is possible to improve performance for both processes, Task Generation and Task Confirmation.

Reproduced in a client with a custom development that has a process that calls this flows many times.

The time taken by this process is around 120 seconds.
No tags attached.
Issue History
2019-11-28 10:25dmiguelezNew Issue
2019-11-28 10:25dmiguelezAssigned To => Triage Finance
2019-11-28 11:13hgbotCheckin
2019-11-28 11:13hgbotNote Added: 0115931
2019-11-28 11:23hgbotCheckin
2019-11-28 11:23hgbotNote Added: 0115932
2019-11-28 15:49hgbotCheckin
2019-11-28 15:49hgbotNote Added: 0115947
2019-11-28 15:49hgbotCheckin
2019-11-28 15:49hgbotNote Added: 0115948
2019-11-28 15:50dmiguelezStatusnew => scheduled
2019-11-28 15:50dmiguelezAssigned ToTriage Finance => dmiguelez
2019-11-28 15:50dmiguelezStatusscheduled => resolved
2019-11-28 15:50dmiguelezResolutionopen => fixed
2019-11-28 15:51dmiguelezNote Added: 0115949
2019-12-09 11:07dmiguelezReview Assigned To => dmiguelez
2019-12-09 11:07dmiguelezNote Added: 0116145
2019-12-09 11:07dmiguelezStatusresolved => closed
2019-12-12 23:01hudsonbotCheckin
2019-12-12 23:01hudsonbotNote Added: 0116291
2022-09-06 17:18caristuCategoryAdvance Warehouse Operations => Advanced Warehouse Operations

Notes
(0115931)
hgbot   
2019-11-28 11:13   
Repository: erp/mods/org.openbravo.distributionorder
Changeset: dc5b6850b16df6c2eb7c7ee4cec2fa741816eda9
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Nov 28 11:13:45 2019 +0100
URL: http://code.openbravo.com/erp/mods/org.openbravo.distributionorder/rev/dc5b6850b16df6c2eb7c7ee4cec2fa741816eda9 [^]

Related to Issue 42430. Performance improvements

  * Moves the refresh of the movement out of the method, to do it
    only once when the calculations are finished
  * Change property navigation with hql query to avoid loading
    more information than necessary into the hibernate session
    and improve performance

---
M src/org/openbravo/distributionorder/erpCommon/utility/DistributioOrderUtils.java
---
(0115932)
hgbot   
2019-11-28 11:23   
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: 004de9677bbdef95974b499e463c340a9d22cd61
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Nov 28 11:23:14 2019 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/004de9677bbdef95974b499e463c340a9d22cd61 [^]

Related to Issue 42430. Performance improvements

  * When a Task is defiened as auto-confirmed, before calling the
    confirmation process, clear the session of hibernate. To do this
    change it is necessary to send the batchOfTasksId as a parameter
    for some methods
  * In RoutingAssignment and WarehouseAssignment, us the productCategoryId
    from the taskRequirement object instead of navigating to the property
    of the product, which triggers a query to the db
  * In Utilities, when calling the movement_post and the inout_post methods
    remove the process and the pinstance objects from the hibernate session

---
M src-test/org/openbravo/warehouse/advancedwarehouseoperations/test/AWOrii_ReferencedInventoryImprovementBoxTest.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/centralbroker/AutoConfirmatorBehaveAsGroupTasks.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/task/InternalRoutingAssignmentUtils.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/task/WarehouseAlgorithmsUtils.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/utils/Utilities.java
---
(0115947)
hgbot   
2019-11-28 15:49   
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations.distributionorders
Changeset: eaaf61d295e8eabe629d79b0807fd8a30d63b94a
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Nov 28 11:16:38 2019 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations.distributionorders/rev/eaaf61d295e8eabe629d79b0807fd8a30d63b94a [^]

Related to Issue 42430. Improve performance

  * Create a new static variable in the class to store the message
    from the Database instead of retrieving it every execution
  * A change has been done in Core in a Trigger to allow to update
    some columns of the movementline when it is already processed.
    With this change it is no longer necessary to disable/enable
    the triggers.

---
M src/org/openbravo/warehouse/advancedwarehouseoperations/distributionorders/ittalgorithm/ReceiptOrIssueDistributionOrder_ITT.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/distributionorders/taskhook/IssueAndReceiptDistributionOrderPostConfirmTaskHook.java
---
(0115948)
hgbot   
2019-11-28 15:49   
Repository: erp/devel/pi
Changeset: ebfdf075a6f7945c3beed432d6ae0eddd573870f
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Nov 28 10:27:46 2019 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/ebfdf075a6f7945c3beed432d6ae0eddd573870f [^]

Related to Issue 42430. Changed validation in Trigger

The validation in the trigger did not allow to do any change to an
already processed or posted inoutline.

The change done is to allow to modify some columns and to control
which ones can not be changed. For example, the updated column
can be modified after this change even if the inoutline is already
posted or processed.

---
M src-db/database/model/triggers/M_MOVEMENTLINE_TRG.xml
---
(0115949)
dmiguelez   
2019-11-28 15:51   
Test plan: Tested in client and time was reduced from 120 to around 80 seconds for the full process.
(0116145)
dmiguelez   
2019-12-09 11:07   
Code Review + Testing Ok
(0116291)
hudsonbot   
2019-12-12 23:01   
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/954d2b7a66fb [^]
Maturity status: Test