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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0050207
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Retail Modules] Web POScriticalhave not tried2022-09-06 09:482022-09-09 13:27
ReporterAugustoMauchView Statuspublic 
Assigned ToRetail 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget VersionRR22Q3.1
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

0050207: 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 ]
blocks feature request 0050166 closedRetail State should be compressed before being persisted in the localstorage 

-  Notes
(0140897)
hgbot (developer)
2022-09-09 10:02

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/405 [^]
(0140903)
hgbot (developer)
2022-09-09 10:53

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/835 [^]
(0140935)
hgbot (developer)
2022-09-09 13:27

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: d8a6d5c2df6e26f38161d0af14328f7a7c875e33
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 09-09-2022 10:00:47
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/d8a6d5c2df6e26f38161d0af14328f7a7c875e33 [^]

Related to ISSUE-50207: 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
---
(0140936)
hgbot (developer)
2022-09-09 13:27

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/405 [^]
(0140937)
hgbot (developer)
2022-09-09 13:27

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/835 [^]
(0140938)
hgbot (developer)
2022-09-09 13:27

Directly closing issue as related merge request is already approved.

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

Fixes ISSUE-50207: 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
---

- Issue History
Date Modified Username Field Change
2022-09-09 09:55 cberner Type feature request => backport
2022-09-09 09:55 cberner Target Version => RR22Q3.1
2022-09-09 10:02 hgbot Note Added: 0140897
2022-09-09 10:53 hgbot Note Added: 0140903
2022-09-09 13:27 hgbot Note Added: 0140935
2022-09-09 13:27 hgbot Note Added: 0140936
2022-09-09 13:27 hgbot Resolution open => fixed
2022-09-09 13:27 hgbot Status scheduled => closed
2022-09-09 13:27 hgbot Note Added: 0140937
2022-09-09 13:27 hgbot Fixed in Version => 22Q3.1
2022-09-09 13:27 hgbot Note Added: 0140938


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker