Openbravo Issue Tracking System - POS2 |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0052052 | POS2 | Core | public | 2023-04-03 18:18 | 2023-09-26 15:03 |
|
Reporter | AugustoMauch | |
Assigned To | AugustoMauch | |
Priority | normal | Severity | major | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | | |
Merge Request Status | |
Review Assigned To | |
OBNetwork customer | |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0052052: Reduce the number of times the state is persisted on disk |
Description | The state is being persisted way too often, and that might be a cause of some of the performance problems that have an impact on the 'back to the past” state problem.
As part of this issue we will try to reduce the number of times the state is persisted by:
Adding a new property to persisted models if true will trigger a throttled persistence just after the state action takes place
Increasing the length of redux’s default throttle from 100m to a much longer value (i.e. 30s)
This will prevent the state from being persisted on disk every time the user executes any action (log would be generated and TerminalLog is a persisted model state). |
Steps To Reproduce | - |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0050361 | | closed | AugustoMauch | Retail Modules | Add a check to automatically restart a cashup if current one is already processed | related to | defect | 0050925 | | closed | AugustoMauch | Retail Modules | ERROR WHILE IMPORTING: org.openbravo.mobile.core.process.OutDatedDataChangeException | related to | feature request | 0051445 | | closed | javierRodriguez | POS2 | Create a mechanism to detect that POS is working with a duplicated ticket id | depends on | backport | 0052247 | 23Q2 | closed | AugustoMauch | POS2 | Reduce the number of times the state is persisted on disk | depends on | backport | 0052248 | 23Q1.3 | closed | AugustoMauch | POS2 | Reduce the number of times the state is persisted on disk | depends on | backport | 0052656 | 22Q3 | closed | meriem_azaf | POS2 | Reduce the number of times the state is persisted on disk | depends on | backport | 0052675 | 22Q4 | closed | meriem_azaf | POS2 | Reduce the number of times the state is persisted on disk | related to | feature request | 0052092 | | closed | gonzalo_fernandez | POS2 | Store a single copy of the Terminal in IndexedDB |
|
Attached Files | 52052_mobCore_21Q4.diff (129,079) 2023-09-26 15:03 https://issues.openbravo.com/file_download.php?file_id=18994&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2023-04-03 18:18 | AugustoMauch | New Issue | |
2023-04-03 18:18 | AugustoMauch | Assigned To | => AugustoMauch |
2023-04-03 18:18 | AugustoMauch | Triggers an Emergency Pack | => No |
2023-04-03 18:20 | hgbot | Note Added: 0148216 | |
2023-04-06 00:28 | hgbot | Note Added: 0148321 | |
2023-04-18 18:18 | hgbot | Note Added: 0148559 | |
2023-04-19 16:02 | hgbot | Note Added: 0148602 | |
2023-04-20 16:00 | AugustoMauch | Status | new => scheduled |
2023-04-20 16:29 | malsasua | Relationship added | related to 0050361 |
2023-04-20 16:32 | malsasua | Relationship added | related to 0050925 |
2023-04-20 16:33 | malsasua | Relationship added | related to 0051445 |
2023-04-20 17:44 | malsasua | Issue Monitored: malsasua | |
2023-04-20 17:45 | Practics | Issue Monitored: Practics | |
2023-04-21 14:24 | hgbot | Resolution | open => fixed |
2023-04-21 14:24 | hgbot | Status | scheduled => closed |
2023-04-21 14:24 | hgbot | Fixed in Version | => RR23Q3 |
2023-04-21 14:24 | hgbot | Note Added: 0148743 | |
2023-04-21 14:24 | hgbot | Note Added: 0148744 | |
2023-04-21 14:24 | hgbot | Note Added: 0148745 | |
2023-04-21 14:24 | hgbot | Note Added: 0148746 | |
2023-04-26 11:38 | AugustoMauch | Status | closed => new |
2023-04-26 11:38 | AugustoMauch | Resolution | fixed => open |
2023-04-26 11:38 | AugustoMauch | Fixed in Version | RR23Q3 => |
2023-04-26 11:39 | AugustoMauch | Status | new => scheduled |
2023-04-26 11:39 | AugustoMauch | Status | scheduled => resolved |
2023-04-26 11:39 | AugustoMauch | Resolution | open => fixed |
2023-04-26 11:39 | AugustoMauch | Status | resolved => closed |
2023-04-26 16:45 | hgbot | Note Added: 0148950 | |
2023-05-11 14:21 | rafaroda | Relationship added | related to 0052092 |
2023-06-02 12:53 | meriem_azaf | Status | closed => new |
2023-06-02 12:53 | meriem_azaf | Resolution | fixed => open |
2023-06-02 12:54 | meriem_azaf | Status | new => scheduled |
2023-06-02 12:57 | meriem_azaf | Relationship added | depends on 0052656 |
2023-06-06 09:07 | meriem_azaf | Relationship added | depends on 0052675 |
2023-06-07 16:23 | AugustoMauch | Status | scheduled => resolved |
2023-06-07 16:23 | AugustoMauch | Resolution | open => fixed |
2023-06-07 16:23 | AugustoMauch | Status | resolved => closed |
2023-06-20 11:20 | meriem_azaf | Relationship added | depends on 0052786 |
2023-06-20 11:23 | meriem_azaf | Relationship deleted | depends on 0052786 |
2023-09-26 15:03 | malsasua | File Added: 52052_mobCore_21Q4.diff | |
Notes |
|
(0148216)
|
hgbot
|
2023-04-03 18:20
|
|
|
|
(0148321)
|
hgbot
|
2023-04-06 00:28
|
|
|
|
(0148559)
|
hgbot
|
2023-04-18 18:18
|
|
|
|
(0148602)
|
hgbot
|
2023-04-19 16:02
|
|
|
|
(0148743)
|
hgbot
|
2023-04-21 14:24
|
|
Directly closing issue as related merge request is already approved.
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: b13853bdbd3df4e89ba982b185b593c5c38259a2
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 21-04-2023 12:24:12
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/b13853bdbd3df4e89ba982b185b593c5c38259a2 [^]
Fixes ISSUE-52052: Reduce the number of times the state will be persisted
This fix means to reduce the number of times the application state is persisted (in localStorage, as of now).
Previous behaviour:
* state actions that generate entries in the Messages model are persisted immediately
* other state actions that belong to persisted models are persisted withing a 100ms throttle
* a persistence is forced when logging out
New behaviour:
* state actions that generate entries in the Messages model are persisted immediately (same as before)
* other state actions that belong to persisted models: a) If they its triggerPersistence is set, they are persisted within a 200ms throttle a) If they its triggerPersistence is not set, they are persisted within a 60s throttle (or persisted when any other persistence with higher priority is triggered)
* a persistence is forced when logging out (same as before)
* a persistence is forced when the window is about to be closed/refreshed when the user is logged in
---
M src/org/openbravo/mobile/core/login/MobileCoreLoginUtilsServlet.java
M web-test/model/application-state/State.test.js
M web/org.openbravo.mobile.core/app/model/application-state/State.js
M web/org.openbravo.mobile.core/app/model/application-state/StateAPI.js
M web/org.openbravo.mobile.core/app/model/application-state/StatePersistence.js
M web/org.openbravo.mobile.core/app/model/business-object/remote-server/RemoteServer.js
M web/org.openbravo.mobile.core/app/model/business-object/terminal-log/TerminalLog.js
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
|
|
|
(0148744)
|
hgbot
|
2023-04-21 14:24
|
|
|
|
(0148745)
|
hgbot
|
2023-04-21 14:24
|
|
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: e98c725846817e2155b02d9419a650beb94a30a9
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 21-04-2023 12:24:33
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/e98c725846817e2155b02d9419a650beb94a30a9 [^]
Related to ISSUE-52052: Force the state to be flushed on browser close/refresh if user is logged in
This MR makes sure state is flushed before the user closes/refreshes the POS tab while being logged in. A popup will be displayed asking for conformation, and while the user clicks on it the state will be flushed.
Changes summary:
* `web-jspack/org.openbravo.core2/src/authentication/loginInitActions.js`: Registers the beforeUnload listener when logging in
* `web-jspack/org.openbravo.core2/src/model/session/user-actions/Logout.js`: Unregisters the beforeUnload listener when logging out
* `web-jspack/org.openbravo.core2/src/model/session/__test__/Logout.test.js`: Adapts test
---
M web-jspack/org.openbravo.core2/src/authentication/loginInitActions.js
M web-jspack/org.openbravo.core2/src/model/session/__test__/Logout.test.js
M web-jspack/org.openbravo.core2/src/model/session/user-actions/Logout.js
---
|
|
|
(0148746)
|
hgbot
|
2023-04-21 14:24
|
|
|
|
(0148950)
|
hgbot
|
2023-04-26 16:45
|
|
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: 6a667d00eba17ca3ed4a23a57c74432ec8785204
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 26-04-2023 16:27:16
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/6a667d00eba17ca3ed4a23a57c74432ec8785204 [^]
Related to ISSUE-52052: Force the state to be flushed on browser close/refresh if user is logged in
This MR makes sure state is flushed before the user closes/refreshes the POS tab while being logged in. A popup will be displayed asking for conformation, and while the user clicks on it the state will be flushed.
Changes summary:
* `web-jspack/org.openbravo.core2/src/authentication/loginInitActions.js`: Registers the beforeUnload listener when logging in
* `web-jspack/org.openbravo.core2/src/model/session/user-actions/Logout.js`: Unregisters the beforeUnload listener when logging out
* `web-jspack/org.openbravo.core2/src/model/session/__test__/Logout.test.js`: Adapts test
---
M web-jspack/org.openbravo.core2/src/authentication/loginInitActions.js
M web-jspack/org.openbravo.core2/src/model/session/__test__/Logout.test.js
M web-jspack/org.openbravo.core2/src/model/session/user-actions/Logout.js
---
|
|