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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0050166
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Retail Modules] Web POScriticalhave not tried2022-09-06 09:482022-09-09 11:00
ReporterAugustoMauchView Statuspublic 
Assigned ToRetail 
PrioritynormalResolutionfixedFixed in Version
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

0050166: State should be compressed before being persisted in the localstorage

DescriptionThe localstorage size limit is quite small (5Mb), so a very big state could not fit in it.

To make this problem less likely to happen, we should compress the state before persisting it. In some tests done using redux-persist-transform-compress, the size of the compressed state was 7x smaller than its uncompressed state.
Steps To Reproduce-
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0050185 newTriage Platform Base State is lost when upgrading from indexeddb persistence to localstorage persistence 
depends on backport 0050207RR22Q3.1 closedRetail State should be compressed before being persisted in the localstorage 
depends on backport 0050208RR22Q2.3 closedRetail State should be compressed before being persisted in the localstorage 

-  Notes
(0140822)
hgbot (developer)
2022-09-07 17:14

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/404 [^]
(0140823)
hgbot (developer)
2022-09-07 17:27

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/833 [^]
(0140904)
hgbot (developer)
2022-09-09 11:00

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/833 [^]
(0140905)
hgbot (developer)
2022-09-09 11:00

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: 4ed3927d1f887c6ab7e392b5853d472c7e7577fb
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 09-09-2022 10:52:27
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/4ed3927d1f887c6ab7e392b5853d472c7e7577fb [^]

Fixes ISSUE-50166: Enables state persistence compression in core2 applications

To enable the compression of the state when it is persisted, the redux-persist-transform-compress library has been installed
and made available in the ReduxCompressor global variable.

---
M templates/ob-pre.js.template
M web-jspack/org.openbravo.core2/package-lock.json
M web-jspack/org.openbravo.core2/package.json
---
(0140906)
hgbot (developer)
2022-09-09 11:00

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/404 [^]
(0140907)
hgbot (developer)
2022-09-09 11:00

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: 7003b00bdbdfbb10e6cc864fa25ca02f2997b140
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 09-09-2022 08:59:59
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/7003b00bdbdfbb10e6cc864fa25ca02f2997b140 [^]

Related to ISSUE-50166: Supports state compression before persisting it

This changeset enables compressing the state before it is persisted, as long as the ReduxCompressor global object is avaialable. For now
it will be available for core2 applications but not for other mobile applications.

Compression is achieved by passing a compression function as a transformer to the ReduxPersist.persistReducer function.

It is important not to lose the currently persisted state when upgrading from previos persistence approaches. This commit includes an automatic
migration for states persisted uncompressed in localstorage and later on [1] we will add automatic migration for states persisted in IndexedDB.

[1] https://issues.openbravo.com/view.php\?id\=50185 [^]

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

- Issue History
Date Modified Username Field Change
2022-09-06 09:48 AugustoMauch New Issue
2022-09-06 09:48 AugustoMauch Assigned To => Retail
2022-09-06 09:48 AugustoMauch Triggers an Emergency Pack => No
2022-09-06 09:49 AugustoMauch Status new => scheduled
2022-09-07 10:40 AugustoMauch Relationship added related to 0050185
2022-09-07 17:14 hgbot Note Added: 0140822
2022-09-07 17:27 hgbot Note Added: 0140823
2022-09-09 09:55 cberner Status scheduled => acknowledged
2022-09-09 09:55 cberner Status acknowledged => scheduled
2022-09-09 11:00 hgbot Resolution open => fixed
2022-09-09 11:00 hgbot Status scheduled => closed
2022-09-09 11:00 hgbot Note Added: 0140904
2022-09-09 11:00 hgbot Fixed in Version => 22Q4
2022-09-09 11:00 hgbot Note Added: 0140905
2022-09-09 11:00 hgbot Note Added: 0140906
2022-09-09 11:00 hgbot Note Added: 0140907


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker