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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0026971
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Retail Modules] Cash upmajorhave not tried2014-06-30 14:282014-09-15 09:34
ReportermtaalView Statuspublic 
Assigned Toadrianromero 
PrioritynormalResolutionfixedFixed in VersionRR14Q4
StatusclosedFix in branchpiFixed in SCM revision
ProjectionnoneETAnoneTarget VersionRR14Q4
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0026971: Improve cashup speed

DescriptionMain place holder for improving the cash up speed.
http://wiki.openbravo.com/wiki/Projects:Analyze_CashUp_Speed [^]
Steps To Reproduce.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0068554)
mtaal (manager)
2014-07-08 11:58

Performance testing at Grape (old version rmp21) shows that the cashclose process is quite slow.
/openbravo/org.openbravo.retail.posterminal.service.jsonrest/org.openbravo.retail.posterminal.ProcessCashClose

Specifically one of the queries is slow. This query is called from this method:
OrderGroupingProcessor.groupOrders

This is the query:
select orderline0_.C_OrderLine_ID as C1_462_, orderline0_.AD_Client_ID as AD2_462_, orderline0_.AD_Org_ID as AD3_462_, orderline0_.IsActive as IsActive462_, orderline0_.Created as Created462_, orderline0_.CreatedBy as CreatedBy462_, orderline0_.Updated as Updated462_, orderline0_.UpdatedBy as UpdatedBy462_, orderline0_.C_Order_ID as C9_462_, orderline0_.Line as Line462_, orderline0_.C_BPartner_ID as C11_462_, orderline0_.C_BPartner_Location_ID as C12_462_, orderline0_.DateOrdered as DateOrd13_462_, orderline0_.DatePromised as DatePro14_462_, orderline0_.DateDelivered as DateDel15_462_, orderline0_.DateInvoiced as DateInv16_462_, orderline0_.Description as Descrip17_462_, orderline0_.M_Product_ID as M18_462_, orderline0_.M_Warehouse_ID as M19_462_, orderline0_.DirectShip as DirectShip462_, orderline0_.C_UOM_ID as C21_462_, orderline0_.QtyOrdered as QtyOrdered462_, orderline0_.QtyReserved as QtyRese23_462_, orderline0_.QtyDelivered as QtyDeli24_462_, orderline0_.QtyInvoiced as QtyInvo25_462_, orderline0_.M_Shipper_ID as M26_462_, orderline0_.C_Currency_ID as C27_462_, orderline0_.PriceList as PriceList462_, orderline0_.PriceActual as PriceAc29_462_, orderline0_.PriceLimit as PriceLimit462_, orderline0_.LineNetAmt as LineNetAmt462_, orderline0_.Discount as Discount462_, orderline0_.FreightAmt as FreightAmt462_, orderline0_.C_Charge_ID as C34_462_, orderline0_.ChargeAmt as ChargeAmt462_, orderline0_.C_Tax_ID as C36_462_, orderline0_.S_ResourceAssignment_ID as S37_462_, orderline0_.Ref_OrderLine_ID as Ref38_462_, orderline0_.M_AttributeSetInstance_ID as M39_462_, orderline0_.IsDescription as IsDescr40_462_, orderline0_.QuantityOrder as Quantit41_462_, orderline0_.M_Product_Uom_Id as M42_462_, orderline0_.M_Offer_ID as M43_462_, orderline0_.PriceStd as PriceStd462_, orderline0_.CANCELPRICEAD as CANCELP45_462_, orderline0_.C_Order_Discount_ID as C46_462_, orderline0_.Iseditlinenetamt as Iseditl47_462_, orderline0_.Taxbaseamt as Taxbaseamt462_, orderline0_.EM_Cdwp_Qty_In_Shipping as EM49_462_, orderline0_.M_Inoutline_ID as M50_462_, orderline0_.C_Return_Reason_ID as C51_462_, orderline0_.Gross_Unit_Price as Gross52_462_, orderline0_.Line_Gross_Amount as Line53_462_, orderline0_.GrossPriceList as GrossPr54_462_, orderline0_.C_Costcenter_ID as C55_462_, orderline0_.EM_Ds_Orderline_ID as EM56_462_, orderline0_.grosspricestd as grosspr57_462_, orderline0_.A_Asset_ID as A58_462_, orderline0_.M_Warehouse_Rule_ID as M59_462_, orderline0_.User1_ID as User60_462_, orderline0_.Quotationline_ID as Quotati61_462_, orderline0_.User2_ID as User62_462_, orderline0_.Create_Reservation as Create63_462_, orderline0_.C_Project_ID as C64_462_, orderline0_.SO_Res_Status as SO65_462_, orderline0_.Manage_Reservation as Manage66_462_, orderline0_.Manage_Prereservation as Manage67_462_, orderline0_.Explode as Explode462_, orderline0_.BOM_Parent_ID as BOM69_462_, orderline0_.EM_Gf_Changeproductnameinto as EM70_462_, orderline0_.EM_Gf_Isprintdiscount as EM71_462_ from C_OrderLine orderline0_ cross join C_Order order7_ where orderline0_.C_Order_ID=order7_.C_Order_ID and (exists (select 1 from FIN_Payment_ScheduleDetail fin_paymen1_ cross join FIN_Payment_Schedule fin_paymen2_ where fin_paymen1_.FIN_Payment_Schedule_Order=fin_paymen2_.Fin_Payment_Schedule_ID and fin_paymen2_.C_Order_ID=orderline0_.C_Order_ID and (exists (select 1 from FIN_Finacc_Transaction fin_finacc3_ cross join FIN_Payment_Detail fin_paymen4_ where fin_paymen1_.FIN_Payment_Detail_ID=fin_paymen4_.Fin_Payment_Detail_ID and (fin_finacc3_.FIN_Reconciliation_ID is null) and fin_finacc3_.Fin_Payment_ID=fin_paymen4_.Fin_Payment_ID))) or not (exists (select 1 from FIN_Payment_ScheduleDetail fin_paymen5_ cross join FIN_Payment_Schedule fin_paymen6_ where fin_paymen5_.FIN_Payment_Schedule_Order=fin_paymen6_.Fin_Payment_Schedule_ID and fin_paymen6_.C_Order_ID=orderline0_.C_Order_ID))) and order7_.EM_Obpos_Applications_ID=$1 and (select case when sum(ol.qtyordered) = 0 then 0 else round(coalesce(sum(ol.qtydelivered), 0)/sum(ol.qtyordered) * 100, 0) end from c_orderline ol where ol.c_order_id=order7_.c_order_id and ol.c_order_discount_id is null )>0 and not (exists (select 1 from C_OrderLine orderline9_ where orderline9_.QtyInvoiced<>0 and orderline9_.C_Order_ID=orderline0_.C_Order_ID)) and (orderline0_.AD_Org_ID in ('BE0AC4CFA26F4F408FD407033E4BFCF9' , '9DB2E1269F0149EDBD0D00C53C7DAC73' , '4525CC3279774C89AC745FE7627C701C' , '504FD243C72E40ABBA834C73B5667EF7' , '7C4A8703014F416CB5222163B9DB1BFE' , '05830B2BCB9D477B9A3F22082634DFFF' , '6C32D1DF2D504ADCA4FC5ABCFCDA18FF' , 'BF22A3C7C9CD4F70814D871A2E4EE7A2' , '6049CE77D04845969D328CA3731F033F' , '2AA41098B0AA47C791B92AE5B1D40A99' , 'DDD786B5320F4B19B19661A9CDBF74EA' , 'C11EF9BFAC03464C9B9E6925C0EE7F8C' , 'E0522AE6B2EA446D85FD69B5CC416826' , 'C11077EB595D403AA87AFEBCC45CD83D' , '387E977F25204A4DB5B6BED50554B168' , '02BC27FC439147F6BB1DF655D03623C0' , 'FB6777E278FD4ED08F9384450FEA3845' , '5F0478879DED4E2CBF387B35A779569E' , '0' , 'B1269F493B1342BE8B4B75D11B995E0E' , '83A0BB79EEDA4ECCB4BCFDF1A9A09466' , 'C069750FD29C46BF98A0F1126496C711')) and (orderline0_.AD_Client_ID in ('A65074D0843147BEB4F13FF007B52F0A' , '0')) and orderline0_.IsActive='Y' order by orderline0_.C_BPartner_ID
(0068712)
hgbot (developer)
2014-07-17 18:03

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 598bc51bb3dfe1d21870d58429de0b713b230a73
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Thu Jul 17 18:02:56 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/598bc51bb3dfe1d21870d58429de0b713b230a73 [^]

Issue 0026971: Improve cashup speed
Adding basic profiling logs for Cash Up process

---
M src/org/openbravo/retail/posterminal/CashCloseProcessor.java
---
(0069609)
hgbot (developer)
2014-08-22 12:35

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: aa681e7026152f68835bca84e0b0fa27615b51a4
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Fri Aug 22 12:34:07 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/aa681e7026152f68835bca84e0b0fa27615b51a4 [^]

Issue 0026971: Improve cashup speed
Adding new timeout argument for synchronization models

---
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
(0069610)
hgbot (developer)
2014-08-22 12:38

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 1b6d2fe93228333f98c834ed94a7909884bc7068
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Fri Aug 22 12:29:39 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1b6d2fe93228333f98c834ed94a7909884bc7068 [^]

Issue 0026971: Improve cashup speed
Removing extra profiling logs

---
M src/org/openbravo/retail/posterminal/CashCloseProcessor.java
M src/org/openbravo/retail/posterminal/OrderGroupingProcessor.java
---
(0069611)
hgbot (developer)
2014-08-22 12:38

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 00141662fd68152165033af77dc3eba50e9eb296
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Fri Aug 22 12:32:03 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/00141662fd68152165033af77dc3eba50e9eb296 [^]

Issue 0026971: Improve cashup speed
Clearing session in invoice creation loop

---
M src/org/openbravo/retail/posterminal/OrderGroupingProcessor.java
---
(0069612)
hgbot (developer)
2014-08-22 12:38

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 76f8206511e65cb6d805f2b8b3d825bf8151c5cf
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Fri Aug 22 12:33:10 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/76f8206511e65cb6d805f2b8b3d825bf8151c5cf [^]

Issue 0026971: Improve cashup speed
Incrementing timeout for OrderLoader and ProcessCashClose synchronization processes

---
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
---
(0069961)
adrianromero (manager)
2014-09-04 13:07

The solution of clearing the Hibernate session in the iteration of the OrderGroupingProcessor. Improves the performance by 23% average.
(0070119)
hgbot (developer)
2014-09-15 09:33

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: ce99bd7da1915f23891775c2583c28761e3581d9
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Mon Sep 15 09:33:19 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/ce99bd7da1915f23891775c2583c28761e3581d9 [^]

Related to issue 26971: Improve cashup speed
Change log level info to debug to not get too many log statements

---
M src/org/openbravo/retail/posterminal/CashCloseProcessor.java
M src/org/openbravo/retail/posterminal/OrderGroupingProcessor.java
---
(0070120)
mtaal (manager)
2014-09-15 09:34

Reviewed

- Issue History
Date Modified Username Field Change
2014-06-30 14:28 mtaal New Issue
2014-06-30 14:28 mtaal Assigned To => Orekaria
2014-06-30 14:28 mtaal Triggers an Emergency Pack => No
2014-06-30 14:34 mtaal Type defect => feature request
2014-07-08 11:58 mtaal Note Added: 0068554
2014-07-17 18:03 hgbot Checkin
2014-07-17 18:03 hgbot Note Added: 0068712
2014-08-20 03:26 eintelau Issue Monitored: eintelau
2014-08-22 12:35 hgbot Checkin
2014-08-22 12:35 hgbot Note Added: 0069609
2014-08-22 12:38 hgbot Checkin
2014-08-22 12:38 hgbot Note Added: 0069610
2014-08-22 12:38 hgbot Checkin
2014-08-22 12:38 hgbot Note Added: 0069611
2014-08-22 12:38 hgbot Checkin
2014-08-22 12:38 hgbot Note Added: 0069612
2014-09-04 13:06 adrianromero Status new => scheduled
2014-09-04 13:06 adrianromero Assigned To Orekaria => adrianromero
2014-09-04 13:06 adrianromero fix_in_branch => pi
2014-09-04 13:07 adrianromero Note Added: 0069961
2014-09-04 13:07 adrianromero Status scheduled => resolved
2014-09-04 13:07 adrianromero Fixed in Version => RR14Q4
2014-09-04 13:07 adrianromero Resolution open => fixed
2014-09-15 09:33 hgbot Checkin
2014-09-15 09:33 hgbot Note Added: 0070119
2014-09-15 09:34 mtaal Note Added: 0070120
2014-09-15 09:34 mtaal Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker