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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0049631
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Retail Modules] Web POSmajorhave not tried2022-06-22 18:022022-06-24 11:28
ReporterAugustoMauchView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionfixedFixed in VersionRR22Q3
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0049631: Persist state in LocalStorage instead of in IndexedDB

DescriptionPersisting the state in IndexedDB has two main disadvantages:
- Reading/writing the state will have an impact on other business logic queries because no two IndexedDB operations can be done at the same time
- We suspect that the many amount of state read/write operations in IndexedDB is resulting in performance degradation in other databases (i.e. masterdata)

We will test how the state is persisted in LocalStorage. This option also has disadvantages, i.e. the state needs to be serialized before being stored.

Also we are throttling the state persistence every 10 ms. We should increase that value at least to 100 ms to prevent persisting the state too often.
Steps To Reproduce-
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0138644)
hgbot (developer)
2022-06-22 18:04

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/383 [^]
(0138731)
hgbot (developer)
2022-06-24 11:28

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/383 [^]
(0138732)
hgbot (developer)
2022-06-24 11:28

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: e88622362a6bf4b22f51ba13cec233d8ddb59e95
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 24-06-2022 11:21:10
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/e88622362a6bf4b22f51ba13cec233d8ddb59e95 [^]

Fixes ISSUE-49631: Persists the state in LocalStorage instead of in IndexedDB

We are switching the state persistence to LocalStorage because we have noticed that storing it in IndexedDB results
in performance degradation of all IndexedDB queries. For instance, in one terminal, a simple query to a master data
model was taking ~50 ms to be completed, and when we deleted the state database the query duration when down to 2 ms.

We are also increasing the throttling time of the state persistence from 10ms to 100ms. That property determines how
often the state persistence will be done and 10ms was just too often. The only risk of increasing this property is that
it is more likely to miss the persistence of a state change. Now if the browser is refreshed <100 ms after the latest
state change, the change might not be persisted. Even though that window of opportunity is higher, 100ms is still a duration
we are confortable with.

---
M web/org.openbravo.mobile.core/app/model/application-state/StatePersistence.js
---

- Issue History
Date Modified Username Field Change
2022-06-22 18:02 AugustoMauch New Issue
2022-06-22 18:02 AugustoMauch Assigned To => AugustoMauch
2022-06-22 18:02 AugustoMauch Triggers an Emergency Pack => No
2022-06-22 18:04 hgbot Note Added: 0138644
2022-06-24 09:57 AugustoMauch Status new => scheduled
2022-06-24 09:58 AugustoMauch Description Updated View Revisions
2022-06-24 11:28 hgbot Resolution open => fixed
2022-06-24 11:28 hgbot Status scheduled => closed
2022-06-24 11:28 hgbot Note Added: 0138731
2022-06-24 11:28 hgbot Fixed in Version => RR22Q3
2022-06-24 11:28 hgbot Note Added: 0138732


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker