Openbravo Issue Tracking System - Retail Modules
View Issue Details
0037416Retail ModulesWeb POSpublic2017-11-29 09:032018-02-07 10:28
guilleaer 
gorka_gil 
normalmajorhave not tried
closedfixed 
5
 
RR18Q1.1RR18Q2 
marvintm
No
0037416: Performance of scrollable table is not good
Scrollable table lines are connected to a model. UI component is listening to changes in that model. If the model changes the UI components is redrawn.

This is nice, because the UI always will show updated data, but it can be a problem if the model properties changes very frequently.

If several property changes are done almost at the same time, for the user perspective doesn't make sense to update the view every single change. It would be better to wait until "cascade" changes finishes and then update the UI component

throttle function (provided by underscore.js) allow us to do it. We will specify a period of time to execute the redraw function. Doesn't matter the number of times that it is invoqued because it will be executed just 2 times (with the first invocation and after XXX milliseconds)
N/A
Insert throttle function
Add preferences to define the time to wait. This value can change depending on the devices where web POS is executed
No tags attached.
depends on defect 0037589RR18Q1.1 closed gorka_gil Test I35741_VerifyRemoveLinesWithServices failling with throttle patch attached 
related to defect 0042611 closed ranjith_qualiantech_com Web POS receipt not scrolling down after adding a product in some situations 
diff only_throttle.diff (5,629) 2018-01-05 11:10
https://issues.openbravo.com/file_download.php?file_id=11424&type=bug
Issue History
2017-11-29 09:03guilleaerNew Issue
2017-11-29 09:03guilleaerAssigned To => Retail
2017-11-29 09:03guilleaerFile Added: only_throttle.diff
2017-11-29 09:03guilleaerTriggers an Emergency Pack => No
2017-12-26 14:08guilleaerTarget VersionRR18Q1 => RR18Q1.1
2018-01-05 11:10guilleaerFile Deleted: only_throttle.diff
2018-01-05 11:10guilleaerFile Added: only_throttle.diff
2018-01-05 12:27guilleaerRelationship addeddepends on 0037589
2018-01-22 13:01hgbotCheckin
2018-01-22 13:01hgbotNote Added: 0101837
2018-01-31 12:35hgbotCheckin
2018-01-31 12:35hgbotNote Added: 0102089
2018-01-31 12:36hgbotCheckin
2018-01-31 12:36hgbotNote Added: 0102090
2018-01-31 12:36hgbotStatusnew => resolved
2018-01-31 12:36hgbotResolutionopen => fixed
2018-01-31 12:36hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/a2086cfed41d5fa7b6e2f479ff33b7cfa507a938 [^]
2018-01-31 15:01marvintmAssigned ToRetail => gorka_gil
2018-01-31 16:13gorka_gilNote Added: 0102094
2018-02-06 18:36marvintmReview Assigned To => marvintm
2018-02-06 18:36marvintmStatusresolved => closed
2018-02-06 18:36marvintmFixed in Version => RR18Q2
2018-02-07 10:28hgbotCheckin
2018-02-07 10:28hgbotNote Added: 0102241
2018-02-16 17:18gorka_gilNote Edited: 0102094bug_revision_view_page.php?bugnote_id=0102094#r16727
2018-02-16 17:19gorka_gilNote Edited: 0102094bug_revision_view_page.php?bugnote_id=0102094#r16732
2020-02-18 14:34ranjith_qualiantech_comRelationship addedrelated to 0042611

Notes
(0101837)
hgbot   
2018-01-22 13:01   
Repository: tools/automation/pi-mobile
Changeset: e531701ee0dc52100cb272e261e5d7b786fb701b
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Tue Jan 16 18:51:45 2018 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/e531701ee0dc52100cb272e261e5d7b786fb701b [^]

Related to issue 37416: After throttle change, reverse payments tests fails when checking if elements in the payment scrollabletable are visible.

Since the dom id has change from when calculated it, till checking the display property.
Added a try/catch to check again when it has fail.

---
M src-test/org/openbravo/test/mobile/core/utils/OBConstants.java
M src-test/org/openbravo/test/mobile/retail/mobilecore/intuitive/IntuitiveCommandsMobileCore.java
---
(0102089)
hgbot   
2018-01-31 12:35   
Repository: tools/automation/pi-mobile
Changeset: 8fe3bb88c369527a2b8c6b7322a38fdbac2ed908
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Wed Jan 31 12:32:48 2018 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/8fe3bb88c369527a2b8c6b7322a38fdbac2ed908 [^]

Related to issue 37416: [throttle] Disable throttle in pi-mobile tests. To activate it in try-retail needed to pass a extra param ACTIVATE_THROTTLE=true

---
M src-test/org/openbravo/test/mobile/retail/mobilecore/javascript/MobileCoreAPI.java
M src-test/org/openbravo/test/mobile/retail/mobilecore/selenium/terminals/MobileCoreTerminalHelper.java
---
(0102090)
hgbot   
2018-01-31 12:36   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: a2086cfed41d5fa7b6e2f479ff33b7cfa507a938
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Tue Jan 30 21:41:03 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/a2086cfed41d5fa7b6e2f479ff33b7cfa507a938 [^]

Fixes issue 37416: [throttle] Improve performance of scrollable table using throttle

---
M src-db/database/sourcedata/AD_PREFERENCE.xml
M src-db/database/sourcedata/AD_REF_LIST.xml
M web/org.openbravo.mobile.core/source/component/ob-scrollabletable.js
---
(0102094)
gorka_gil   
2018-01-31 16:13   
(edited on: 2018-02-16 17:19)
By default the throttle is enabled in the repository, meaning that any one with this change will have the throttle enabled.

But since this change produce some random problems in try-retail, the throttle is disabled in all tests (which includes try-retail, quarantine and retail integration)

Note that when running tests in local the throttle will remain enabled, but usually running tests in local don't reproduce the random issues that happen in try-retail.

For execute a try-retail with the throttle enabled needed to pass this extra parameter: ACTIVATE_THROTTLE=true

(0102241)
hgbot   
2018-02-07 10:28   
Repository: tools/automation/pi-mobile
Changeset: c0ef5f1e808f508b61bbc380bbb85ed424cc6a59
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Tue Feb 06 12:56:48 2018 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/c0ef5f1e808f508b61bbc380bbb85ed424cc6a59 [^]

Related to issue 37416: [throttle] disable throttle only in ci servers (try,qarantine,integration,highvol,storeserver,modules,etc)

---
M src-test/org/openbravo/test/mobile/retail/mobilecore/javascript/MobileCoreAPI.java
M src-test/org/openbravo/test/mobile/retail/mobilecore/selenium/terminals/MobileCoreTerminalHelper.java
---