Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0042356 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Web POS | major | always | 2019-11-20 22:59 | 2019-11-29 22:08 | |||
Reporter | mauricio_peccorini | View Status | public | |||||
Assigned To | ranjith_qualiantech_com | |||||||
Priority | high | Resolution | fixed | Fixed in Version | RR20Q1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | c5f12708ce47 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | guilleaer | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0042356: Messages, translations and lists for all modules are loaded from the database every time WebPOS is accessed or refreshed | |||||||
Description | 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. | |||||||
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 Solution | 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 | |||||||
Tags | No tags attached. | |||||||
Attached Files | LabelsComponent.diff [^] (8,332 bytes) 2019-11-21 12:13 [Show Content] | |||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||||||||||||||||
|
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 |