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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0042356
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2019-11-20 22:592019-11-29 22:08
Reportermauricio_peccoriniView Statuspublic 
Assigned Toranjith_qualiantech_com 
PriorityhighResolutionfixedFixed in VersionRR20Q1
StatusclosedFix in branchFixed in SCM revisionc5f12708ce47
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toguilleaer
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0042356: Messages, translations and lists for all modules are loaded from the database every time WebPOS is accessed or refreshed

DescriptionAs 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.
Steps To Reproduce- 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)
Proposed SolutionStore 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
TagsNo tags attached.
Attached Filesdiff file icon LabelsComponent.diff [^] (8,332 bytes) 2019-11-21 12:13 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to design defect 0045562 newRetail 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 newTriage Platform Base Bad translation between the 2 nodes 
causes defect 0044643 closedranjith_qualiantech_com LabelComponent languageSk is not updated with language name 
causes defect 0044670 closedRetail The language search key is set to the wrong value. 

-  Notes
(0115783)
hgbot (developer)
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 (developer)
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 (developer)
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
---

- Issue History
Date Modified Username Field Change
2019-11-20 22:59 mauricio_peccorini New Issue
2019-11-20 22:59 mauricio_peccorini Assigned To => Retail
2019-11-20 22:59 mauricio_peccorini File Added: LabelsComponent.diff
2019-11-20 22:59 mauricio_peccorini Triggers an Emergency Pack => No
2019-11-20 23:16 mauricio_peccorini File Deleted: LabelsComponent.diff
2019-11-20 23:16 mauricio_peccorini File Added: LabelsComponent.diff
2019-11-21 12:12 mauricio_peccorini File Deleted: LabelsComponent.diff
2019-11-21 12:13 mauricio_peccorini File Added: LabelsComponent.diff
2019-11-21 12:21 ranjith_qualiantech_com Assigned To Retail => ranjith_qualiantech_com
2019-11-21 12:21 ranjith_qualiantech_com Status new => scheduled
2019-11-25 07:12 hgbot Checkin
2019-11-25 07:12 hgbot Note Added: 0115783
2019-11-25 07:12 hgbot Status scheduled => resolved
2019-11-25 07:12 hgbot Resolution open => fixed
2019-11-25 07:12 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/c5f12708ce47a14f3d8fba7dd2b1ff380fc18deb [^]
2019-11-25 08:49 hgbot Checkin
2019-11-25 08:49 hgbot Note Added: 0115787
2019-11-29 13:48 hgbot Checkin
2019-11-29 13:48 hgbot Note Added: 0115985
2019-11-29 22:08 guilleaer Review Assigned To => guilleaer
2019-11-29 22:08 guilleaer Status resolved => closed
2019-11-29 22:08 guilleaer Fixed in Version => RR20Q1
2020-07-21 10:08 ranjith_qualiantech_com Relationship added causes 0044643
2020-07-22 18:04 Leyre Relationship added causes 0044670
2020-12-14 09:30 salvador_campanella Relationship added related to 0045562
2024-03-18 13:17 alostale Relationship added related to 0053470


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker