Openbravo Issue Tracking System - Retail Modules
View Issue Details
0028339Retail ModulesWeb POSpublic2014-12-02 19:272015-02-27 08:48
jecharri 
malsasua 
urgentmajoralways
closedfixed 
5
 
RR15Q2RR15Q2 
adrianromero
Production - Confirmed Stable
2014-06-10
RR14Q3
https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/12279adf5f5e [^]
No
0028339: The performance of Web POS when you add product is not really good in all computers
The performance of Web POS when you add product is not really good in all computers
-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 [^]
No tags attached.
pdf Performance.pdf (976,400) 2014-12-15 03:20
https://issues.openbravo.com/file_download.php?file_id=7599&type=bug
Issue History
2014-12-02 19:27jecharriNew Issue
2014-12-02 19:27jecharriAssigned To => marvintm
2014-12-02 19:27jecharriResolution time => 1389135600
2014-12-02 19:27jecharriTriggers an Emergency Pack => No
2014-12-08 12:15mtaalAssigned Tomarvintm => szapata
2014-12-08 12:19mtaalResolution time1389135600 => 1420671600
2014-12-15 03:20szapataFile Added: Performance.pdf
2014-12-15 03:25szapataNote Added: 0072483
2014-12-19 10:09mtaalTarget VersionRR15Q1 => RR15Q2
2015-01-07 13:16mtaalAssigned Toszapata => migueldejuana
2015-01-23 10:37migueldejuanaNote Added: 0073746
2015-01-23 12:39migueldejuanaRegression level => Production - Confirmed Stable
2015-01-23 12:39migueldejuanaRegression date => 2014-06-10
2015-01-23 12:39migueldejuanaRegression introduced in release => RR14Q3
2015-01-23 12:39migueldejuanaRegression introduced by commit => https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/12279adf5f5e [^]
2015-01-27 19:11hgbotCheckin
2015-01-27 19:11hgbotNote Added: 0073830
2015-01-27 19:11hgbotStatusnew => resolved
2015-01-27 19:11hgbotResolutionopen => fixed
2015-01-27 19:11hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/bce3c8885a7311f67c7bb8f4a8db08ab04921ac0 [^]
2015-01-27 19:13hgbotCheckin
2015-01-27 19:13hgbotNote Added: 0073831
2015-01-27 19:13hgbotFixed in SCM revisionhttp://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:13hgbotCheckin
2015-01-27 19:13hgbotNote Added: 0073832
2015-01-27 19:13hgbotFixed in SCM revisionhttp://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:11hgbotCheckin
2015-01-28 14:11hgbotNote Added: 0073858
2015-01-28 14:11hgbotFixed in SCM revisionhttp://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:12hgbotCheckin
2015-01-28 15:12hgbotNote Added: 0073860
2015-01-28 15:12hgbotFixed in SCM revisionhttp://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:15hgbotCheckin
2015-01-28 16:15hgbotNote Added: 0073862
2015-01-28 16:15hgbotFixed in SCM revisionhttp://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:12hgbotCheckin
2015-01-28 17:12hgbotNote Added: 0073865
2015-01-28 17:21hgbotCheckin
2015-01-28 17:21hgbotNote Added: 0073866
2015-01-29 11:19hgbotCheckin
2015-01-29 11:19hgbotNote Added: 0073886
2015-01-29 11:19hgbotFixed in SCM revisionhttp://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:19hgbotCheckin
2015-01-29 11:19hgbotNote Added: 0073887
2015-01-29 11:19hgbotFixed in SCM revisionhttp://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:19hgbotCheckin
2015-01-29 11:19hgbotNote Added: 0073888
2015-01-29 11:19hgbotFixed in SCM revisionhttp://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:50hgbotCheckin
2015-01-29 13:50hgbotNote Added: 0073900
2015-01-29 13:50hgbotFixed in SCM revisionhttp://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:44migueldejuanaAssigned Tomigueldejuana => malsasua
2015-02-26 17:36dmitry_mezentsevNote Added: 0074983
2015-02-26 18:26hgbotCheckin
2015-02-26 18:26hgbotNote Added: 0074991
2015-02-26 18:26hgbotFixed in SCM revisionhttp://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:48adrianromeroReview Assigned To => adrianromero
2015-02-27 08:48adrianromeroNote Added: 0075011
2015-02-27 08:48adrianromeroStatusresolved => closed
2015-02-27 08:48adrianromeroFixed in Version => RR15Q2

Notes
(0072483)
szapata   
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   
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   
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   
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   
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   
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   
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   
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   
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   
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   
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   
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   
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   
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   
2015-02-26 17:36   
Not closed for 30 days!!!
Immediate action is required.
(0074991)
hgbot   
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   
2015-02-27 08:48   
Verified