Openbravo Issue Tracking System - Retail Modules
View Issue Details
0042356Retail ModulesWeb POSpublic2019-11-20 22:592019-11-29 22:08
mauricio_peccorini 
ranjith_qualiantech_com 
highmajoralways
closedfixed 
5
 
RR20Q1 
guilleaer
No
0042356: Messages, translations and lists for all modules are loaded from the database every time WebPOS is accessed or refreshed
As part of the initial loading steps of WebPOS there are some pre-render actions that include loading all the messages, translations and lists. This information is not cached so the same results are loaded from the database many times.
- Add a breakpoint in org.openbravo.mobile.core.login.LabelsComponent in functions getLabels() in line 'for (Object[] qryTrlObject : qryLists.list()) {'
- Load the WebPOS login screen (the breakpoint is hit)
- Refresh the page (the breakpoint is hit again)
- Load the WebPOS login screen from other computer (the breakpoint is hit again)
Store the results of getLabels and getLists in a map (ConcurrentHashMap) keyed by the calling parameter moduleId and languageId. The languageId can be null so it should be calculated before getting/putting values in the map. The result from getLabels includes the userId, so the JSONObject without that value should be stored in the map and cloned on each call so the userId can be put into the returned JSONObject.

See the attached diff
No tags attached.
related to design defect 0045562 new Retail Messages, translations and lists for all modules are loaded from the database every time WebPOS is accessed or refreshed in HA 
related to design defect 0053470 new Triage Platform Base Bad translation between the 2 nodes 
causes defect 0044643 closed ranjith_qualiantech_com LabelComponent languageSk is not updated with language name 
causes defect 0044670 closed Retail The language search key is set to the wrong value. 
diff LabelsComponent.diff (8,332) 2019-11-21 12:13
https://issues.openbravo.com/file_download.php?file_id=13571&type=bug
Issue History
2019-11-20 22:59mauricio_peccoriniNew Issue
2019-11-20 22:59mauricio_peccoriniAssigned To => Retail
2019-11-20 22:59mauricio_peccoriniFile Added: LabelsComponent.diff
2019-11-20 22:59mauricio_peccoriniTriggers an Emergency Pack => No
2019-11-20 23:16mauricio_peccoriniFile Deleted: LabelsComponent.diff
2019-11-20 23:16mauricio_peccoriniFile Added: LabelsComponent.diff
2019-11-21 12:12mauricio_peccoriniFile Deleted: LabelsComponent.diff
2019-11-21 12:13mauricio_peccoriniFile Added: LabelsComponent.diff
2019-11-21 12:21ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2019-11-21 12:21ranjith_qualiantech_comStatusnew => scheduled
2019-11-25 07:12hgbotCheckin
2019-11-25 07:12hgbotNote Added: 0115783
2019-11-25 07:12hgbotStatusscheduled => resolved
2019-11-25 07:12hgbotResolutionopen => fixed
2019-11-25 07:12hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/c5f12708ce47a14f3d8fba7dd2b1ff380fc18deb [^]
2019-11-25 08:49hgbotCheckin
2019-11-25 08:49hgbotNote Added: 0115787
2019-11-29 13:48hgbotCheckin
2019-11-29 13:48hgbotNote Added: 0115985
2019-11-29 22:08guilleaerReview Assigned To => guilleaer
2019-11-29 22:08guilleaerStatusresolved => closed
2019-11-29 22:08guilleaerFixed in Version => RR20Q1
2020-07-21 10:08ranjith_qualiantech_comRelationship addedcauses 0044643
2020-07-22 18:04LeyreRelationship addedcauses 0044670
2020-12-14 09:30salvador_campanellaRelationship addedrelated to 0045562
2024-03-18 13:17alostaleRelationship addedrelated to 0053470

Notes
(0115783)
hgbot   
2019-11-25 07:12   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: c5f12708ce47a14f3d8fba7dd2b1ff380fc18deb
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Nov 25 11:42:00 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/c5f12708ce47a14f3d8fba7dd2b1ff380fc18deb [^]

Fixed issue 42356 : Labels and Reference List should be fetched only once

* If Application is not in development, Labels and Reference List
  should be fetched only once when LabelsComponent is called

---
M src/org/openbravo/mobile/core/login/LabelsComponent.java
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
A src/org/openbravo/mobile/core/eventobservers/LabelsChangedEvent.java
---
(0115787)
hgbot   
2019-11-25 08:49   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 772fb74d3bbd6dcfa0e70cfe4e38ac18a436dba8
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Nov 25 13:19:31 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/772fb74d3bbd6dcfa0e70cfe4e38ac18a436dba8 [^]

Related to issue 42356 : Updated Missing Static method in LabelsComponent

---
M src/org/openbravo/mobile/core/login/LabelsComponent.java
---
(0115985)
hgbot   
2019-11-29 13:48   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: b5a2e88524f9f223b721d1093e4aa059ca370362
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Nov 29 18:18:06 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/b5a2e88524f9f223b721d1093e4aa059ca370362 [^]

Related to issue 42356 : Modified LabelsComponent method to improve performance

* Replaced list() with count() to improve performance

---
M src/org/openbravo/mobile/core/login/LabelsComponent.java
---