Openbravo Issue Tracking System - Retail Modules
View Issue Details
0033181Retail ModulesWeb POSpublic2016-06-07 18:382016-06-07 18:41
shuehner 
Retail 
normalminorhave not tried
newopen 
5
 
 
No
0033181: Most OrderLoader insert flush() 'ed' during call to getStock which is non-obvious and breaks debug timing
OrderLoader schedules many insert (order,lines,tax,lines-tax) and next DAL flush will only execute the corresponding SQL's.

Currently that next DAL-flush happening is the one very hidden inside StockUtils.getStock which does a flush on its own.

On top of being very non-obvious where the inserts happen that leads to the time the 'inserts' in the database take to be attributed to the 'getStock' section in the performance time logging of the OrderLoader.

Also that flush in getStock triggers a flush per getStock call ( in practice per line of the Order) which is not required.

I suggest to add a single clear flush() in the orderLoader itself to be able to clearly report take this one takes.

The 'flush' happens in the StockUtils function should be made optional (will be logged as separate issue and linked to this one).

A possible location to add the new flush() in the OrderLoader could be just before the 'createShipmentLines' function call.
-
Performance
related to defect 0033182 new Triage Omni WMS Openbravo ERP StockUtils.getStock functions forces flush on all users even if that is not wanted 
Issue History
2016-06-07 18:38shuehnerNew Issue
2016-06-07 18:38shuehnerAssigned To => Retail
2016-06-07 18:38shuehnerTriggers an Emergency Pack => No
2016-06-07 18:38shuehnerTag Attached: Performance
2016-06-07 18:41shuehnerRelationship addedrelated to 0033182

There are no notes attached to this issue.