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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0028339
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2014-12-02 19:272015-02-27 08:48
ReporterjecharriView Statuspublic 
Assigned Tomalsasua 
PriorityurgentResolutionfixedFixed in VersionRR15Q2
StatusclosedFix in branchFixed in SCM revisione5e42f6bf6a6
ProjectionnoneETAnoneTarget VersionRR15Q2
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toadrianromero
Regression levelProduction - Confirmed Stable
Regression date2014-06-10
Regression introduced in releaseRR14Q3
Regression introduced by commithttps://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/12279adf5f5e [^]
Triggers an Emergency PackNo
Summary

0028339: The performance of Web POS when you add product is not really good in all computers

DescriptionThe performance of Web POS when you add product is not really good in all computers
Steps To Reproduce-The problem happens in laptops with standard characteristics. Two examples:
1.1 Processor: Intel Core(TM) i5-2450M @2.5GHz 2.5GHz
1.2. RAM: 4GB
1.3. OS: Windows 7 Ultimate SP1
1.4. HDD: 500GB

2.1. Processor: Intel Core 2 duo CPU T7300 @ 2.0GHz
2.2. RAM: 8GB
2.3. OS: Ubuntu 14.04LTS
2.4. HDD hard disk

The problem it seems that it is worse if you add more and more products to the ticket. However when you have 10-20 products added and you try to add a product that is part of a discount, the total also takes a lot of time to upgrade.

In the following URL's you can find 2 examples, the first one in a laptop with good characteristics and the second one in a Core 2 Duo laptop

Good
https://drive.google.com/file/d/0B56e7MMclQ6DWG5ZZk1xUzVCbEk/view?usp=sharing [^]
Bad
https://drive.google.com/file/d/0B56e7MMclQ6DRVFBTFRDWUJIWm8/view?usp=sharing [^]
TagsNo tags attached.
Attached Filespdf file icon Performance.pdf [^] (976,400 bytes) 2014-12-15 03:20

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0072483)
szapata (developer)
2014-12-15 03:25

See attached pdf explaining where is spending more time when rendering the total.

The problem seems to be focused on Tax calculation and Discounts calculation.

Tested with the new discount flow and in line number 50 it was slow, testing with the old flow it started to be slow in line 150.

With profiler and timeline (chrome dev. tools), I saw that the most expensive transaction is the query executed in the success callback of the OBPOS_FindTaxRate hook.

Fixing this requires a big refactoring, trying to do a simpler query and process the data in plain javascript.
(0073746)
migueldejuana (developer)
2015-01-23 10:37

I've tested it in an instance with all extra modules installed and the performance is really bad. We should check modules which add time when calculating a discount or when adding a product and analyze them.
(0073830)
hgbot (developer)
2015-01-27 19:11

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: bce3c8885a7311f67c7bb8f4a8db08ab04921ac0
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Tue Jan 27 19:11:15 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/bce3c8885a7311f67c7bb8f4a8db08ab04921ac0 [^]

fixed issue 28339: use cache in discounts queries

---
M web/org.openbravo.mobile.core/source/data/ob-cache.js
---
(0073831)
hgbot (developer)
2015-01-27 19:13

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 8f6126a90ab9bafcfa5d29f7859a3196790e069b
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Tue Jan 27 18:37:52 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/8f6126a90ab9bafcfa5d29f7859a3196790e069b [^]

fixed issue 28339: when line has not promotions related, event to create promotion is not created

---
M web/org.openbravo.retail.posterminal/js/model/discounts.js
M web/org.openbravo.retail.posterminal/js/model/executor.js
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/model/pointofsale-model.js
---
(0073832)
hgbot (developer)
2015-01-27 19:13

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 41bf538fa7dbacc1651ee3727db8286971fa1fef
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Tue Jan 27 19:12:30 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/41bf538fa7dbacc1651ee3727db8286971fa1fef [^]

fixed issue 28339: use cache in discounts queries

---
M web/org.openbravo.retail.posterminal/js/model/executor.js
---
(0073858)
hgbot (developer)
2015-01-28 14:11

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: b406f50153a0cf9f8618fe5740494981bfcd5033
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Wed Jan 28 14:10:32 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/b406f50153a0cf9f8618fe5740494981bfcd5033 [^]

fixed issue 28339: calculate gross is launched only once by all discounts events

---
M web/org.openbravo.retail.posterminal/js/model/discounts.js
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0073860)
hgbot (developer)
2015-01-28 15:12

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 12f4b1aed4abc30e87b26e1945285d40261e2bb5
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Wed Jan 28 15:12:21 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/12f4b1aed4abc30e87b26e1945285d40261e2bb5 [^]

fixed issue 28339: changed the event's executor to able to choice when start the execution of events

---
M web/org.openbravo.retail.posterminal/js/model/discounts.js
M web/org.openbravo.retail.posterminal/js/model/executor.js
---
(0073862)
hgbot (developer)
2015-01-28 16:15

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: a23d388400d21f5d6848d3ec9bf555d1e4303ac4
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Wed Jan 28 16:15:06 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/a23d388400d21f5d6848d3ec9bf555d1e4303ac4 [^]

fixed issue 28339: calculateGross is executed when all lines of the ticket are 'noDiscountCandidates'

---
M web/org.openbravo.retail.posterminal/js/model/discounts.js
---
(0073865)
hgbot (developer)
2015-01-28 17:12

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 932c019fa9c24873e24cb60e3ca04162e2a1e771
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Wed Jan 28 17:12:25 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/932c019fa9c24873e24cb60e3ca04162e2a1e771 [^]

Related to issue 28339. Add queryUsingCache method, similar to findUsingCache but for generic sql queries.

---
M web/org.openbravo.mobile.core/source/data/ob-dal.js
---
(0073866)
hgbot (developer)
2015-01-28 17:21

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: d01540894fadc23e4c2769560869b6b035111c14
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Wed Jan 28 17:21:19 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d01540894fadc23e4c2769560869b6b035111c14 [^]

Related to issue 28339. Two improvements in tax computation have been made:
- Now the main query to find taxes is cached.
- Reduced the number of Backbone 'set's called, and also made silent a couple of them, to minimize the number of events which are triggered, to increase performance

---
M web/org.openbravo.retail.posterminal/js/data/dataordertaxes.js
---
(0073886)
hgbot (developer)
2015-01-29 11:19

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 72e234375a44fcb1807afa01d394de7e8d61d725
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Thu Jan 29 10:55:44 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/72e234375a44fcb1807afa01d394de7e8d61d725 [^]

fixed issue 28339: revert changeset 12f4b1aed4ab: changed the event's executor to able to choice when start the execution of events

---
M web/org.openbravo.retail.posterminal/js/model/discounts.js
M web/org.openbravo.retail.posterminal/js/model/executor.js
---
(0073887)
hgbot (developer)
2015-01-29 11:19

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: bc2926798780cf576d919f9def25e7ba7b87d578
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Thu Jan 29 10:57:49 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/bc2926798780cf576d919f9def25e7ba7b87d578 [^]

fixed issue 28339: revert changeset b406f50153a0: calculate gross is launched only once by all discounts events

---
M web/org.openbravo.retail.posterminal/js/model/discounts.js
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0073888)
hgbot (developer)
2015-01-29 11:19

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 7cf78570ae399b5ceb6fd3c01477deed2c77427d
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Thu Jan 29 10:59:01 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/7cf78570ae399b5ceb6fd3c01477deed2c77427d [^]

fixed issue 28339: revert changeset 41bf538fa7db: use cache in discounts queries

---
M web/org.openbravo.retail.posterminal/js/model/executor.js
---
(0073900)
hgbot (developer)
2015-01-29 13:50

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 29d39c0968c9dc9e9b7dfa29355f2f8fc141e53a
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Thu Jan 29 13:49:52 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/29d39c0968c9dc9e9b7dfa29355f2f8fc141e53a [^]

fixed issue 28339: the taxes queue is populated with all lines at the begin of the process

---
M web/org.openbravo.retail.posterminal/js/data/dataordertaxes.js
---
(0074983)
dmitry_mezentsev (developer)
2015-02-26 17:36

Not closed for 30 days!!!
Immediate action is required.
(0074991)
hgbot (developer)
2015-02-26 18:26

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: e5e42f6bf6a6ff9eb2bc2c4745b69182dd76bd48
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Thu Feb 26 18:25:35 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/e5e42f6bf6a6ff9eb2bc2c4745b69182dd76bd48 [^]

fixed issue 28339: added silent:true to the property noDiscountCandidates

---
M web/org.openbravo.retail.posterminal/js/model/discounts.js
M web/org.openbravo.retail.posterminal/js/model/executor.js
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/model/pointofsale-model.js
---
(0075011)
adrianromero (manager)
2015-02-27 08:48

Verified

- Issue History
Date Modified Username Field Change
2014-12-02 19:27 jecharri New Issue
2014-12-02 19:27 jecharri Assigned To => marvintm
2014-12-02 19:27 jecharri Triggers an Emergency Pack => No
2014-12-08 12:15 mtaal Assigned To marvintm => szapata
2014-12-15 03:20 szapata File Added: Performance.pdf
2014-12-15 03:25 szapata Note Added: 0072483
2014-12-19 10:09 mtaal Target Version RR15Q1 => RR15Q2
2015-01-07 13:16 mtaal Assigned To szapata => migueldejuana
2015-01-23 10:37 migueldejuana Note Added: 0073746
2015-01-23 12:39 migueldejuana Regression level => Production - Confirmed Stable
2015-01-23 12:39 migueldejuana Regression date => 2014-06-10
2015-01-23 12:39 migueldejuana Regression introduced in release => RR14Q3
2015-01-23 12:39 migueldejuana Regression introduced by commit => https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/12279adf5f5e [^]
2015-01-27 19:11 hgbot Checkin
2015-01-27 19:11 hgbot Note Added: 0073830
2015-01-27 19:11 hgbot Status new => resolved
2015-01-27 19:11 hgbot Resolution open => fixed
2015-01-27 19:11 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/bce3c8885a7311f67c7bb8f4a8db08ab04921ac0 [^]
2015-01-27 19:13 hgbot Checkin
2015-01-27 19:13 hgbot Note Added: 0073831
2015-01-27 19:13 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/bce3c8885a7311f67c7bb8f4a8db08ab04921ac0 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/8f6126a90ab9bafcfa5d29f7859a3196790e069b [^]
2015-01-27 19:13 hgbot Checkin
2015-01-27 19:13 hgbot Note Added: 0073832
2015-01-27 19:13 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/8f6126a90ab9bafcfa5d29f7859a3196790e069b [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/41bf538fa7dbacc1651ee3727db8286971fa1fef [^]
2015-01-28 14:11 hgbot Checkin
2015-01-28 14:11 hgbot Note Added: 0073858
2015-01-28 14:11 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/41bf538fa7dbacc1651ee3727db8286971fa1fef [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/b406f50153a0cf9f8618fe5740494981bfcd5033 [^]
2015-01-28 15:12 hgbot Checkin
2015-01-28 15:12 hgbot Note Added: 0073860
2015-01-28 15:12 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/b406f50153a0cf9f8618fe5740494981bfcd5033 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/12f4b1aed4abc30e87b26e1945285d40261e2bb5 [^]
2015-01-28 16:15 hgbot Checkin
2015-01-28 16:15 hgbot Note Added: 0073862
2015-01-28 16:15 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/12f4b1aed4abc30e87b26e1945285d40261e2bb5 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/a23d388400d21f5d6848d3ec9bf555d1e4303ac4 [^]
2015-01-28 17:12 hgbot Checkin
2015-01-28 17:12 hgbot Note Added: 0073865
2015-01-28 17:21 hgbot Checkin
2015-01-28 17:21 hgbot Note Added: 0073866
2015-01-29 11:19 hgbot Checkin
2015-01-29 11:19 hgbot Note Added: 0073886
2015-01-29 11:19 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/a23d388400d21f5d6848d3ec9bf555d1e4303ac4 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/72e234375a44fcb1807afa01d394de7e8d61d725 [^]
2015-01-29 11:19 hgbot Checkin
2015-01-29 11:19 hgbot Note Added: 0073887
2015-01-29 11:19 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/72e234375a44fcb1807afa01d394de7e8d61d725 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/bc2926798780cf576d919f9def25e7ba7b87d578 [^]
2015-01-29 11:19 hgbot Checkin
2015-01-29 11:19 hgbot Note Added: 0073888
2015-01-29 11:19 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/bc2926798780cf576d919f9def25e7ba7b87d578 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/7cf78570ae399b5ceb6fd3c01477deed2c77427d [^]
2015-01-29 13:50 hgbot Checkin
2015-01-29 13:50 hgbot Note Added: 0073900
2015-01-29 13:50 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/7cf78570ae399b5ceb6fd3c01477deed2c77427d [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/29d39c0968c9dc9e9b7dfa29355f2f8fc141e53a [^]
2015-02-20 13:44 migueldejuana Assigned To migueldejuana => malsasua
2015-02-26 17:36 dmitry_mezentsev Note Added: 0074983
2015-02-26 18:26 hgbot Checkin
2015-02-26 18:26 hgbot Note Added: 0074991
2015-02-26 18:26 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/29d39c0968c9dc9e9b7dfa29355f2f8fc141e53a [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/e5e42f6bf6a6ff9eb2bc2c4745b69182dd76bd48 [^]
2015-02-27 08:48 adrianromero Review Assigned To => adrianromero
2015-02-27 08:48 adrianromero Note Added: 0075011
2015-02-27 08:48 adrianromero Status resolved => closed
2015-02-27 08:48 adrianromero Fixed in Version => RR15Q2


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker