Openbravo Issue Tracking System - Retail Modules
View Issue Details
0048977Retail ModulesWeb POSpublic2022-04-06 09:362022-04-06 10:04
AugustoMauch 
AugustoMauch 
normalmajorhave not tried
scheduledopen 
5
 
 
No
0048977: IndexedDB throttle wait time should be increase to prevent performance impact on user actions
IndexedDB state persistence process is throttled, meaning that when it is invoked, its execution is delayed a preconfigured wait time and if another execution is done in that wait time, only the second one will be actually executed (unless a third one is done before the wait time, and so on).

Currently the wait time is 10 milliseconds, and that is a problem because in practice state persistence is taking place at the same time the posthooks of user actions are executed, and that results in very slow queries because there is a single thread to do IndexedDB queries/updates.

We should increase the throttle wait time for the state persistence to try to ensure it takes place outside the context of the current action it is part of.

[1] https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/blob/master/web/org.openbravo.mobile.core/app/model/application-state/StatePersistence.js#L192 [^]
See attached image, it showed what happens when a user action is executed. The pink box on the left is the state action that triggers a state persistence (green long boxes) in 10ms. Right after that, posthooks are executed, and the execution of its queries are delayed until the state persistence finishes.

We want the persistence to take place outside the user action context
No tags attached.
png statePersistence.png (10,904) 2022-04-06 10:02
https://issues.openbravo.com/file_download.php?file_id=16852&type=bug
png
Issue History
2022-04-06 09:36AugustoMauchNew Issue
2022-04-06 09:36AugustoMauchAssigned To => AugustoMauch
2022-04-06 09:36AugustoMauchTriggers an Emergency Pack => No
2022-04-06 10:02AugustoMauchStatusnew => scheduled
2022-04-06 10:02AugustoMauchFile Added: statePersistence.png
2022-04-06 10:04AugustoMauchSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=23879#r23879

There are no notes attached to this issue.