Openbravo Issue Tracking System - Retail Modules
View Issue Details
0044746Retail ModulesWeb POSpublic2020-08-04 09:182020-09-04 08:12
guillermogil 
prakashmurugesan88 
urgentcriticalalways
closedno change required 
5
RR20Q1.2 
 
marvintm
No
0044746: Login time too high
Time to login is big even if we are not doing the incremental refresh (we are using the "No Incremental Refresh at Login" preference):
TIMING
initModels: 62.0150000004287ms
initUI: 702.064999999493ms
loadModels: 5107.645000000048ms (almost all of the time in DiscountInitCache: 4958.859999999731ms)
renderUI: 282.6650000006339ms
TOTAL: 6155.445000000327ms

Biggest data we have:
75k products
3k discounts
3k discounts product
We have lots of BPs although the the model is set as remote


Note: It does not seems to happen on future releases due to the indexedDB feature
Login
F5
You will notice that the time to login is high
On init the cache should be avoided to use the transformation to backbone models
Performance
depends on backport 0044855RR20Q2.2 closed prakashmurugesan88 Login time too high 
has duplicate defect 0044846 closed Retail Performance problem loading a POS Terminal with high amount of discounts 
patch I44746_ScaledPrice_V2.patch (4,443) 2020-08-21 07:24
https://issues.openbravo.com/file_download.php?file_id=14882&type=bug
patch I44746_Combo_V2.patch (7,942) 2020-08-21 07:24
https://issues.openbravo.com/file_download.php?file_id=14883&type=bug
patch I44746_ByTotal_V2.patch (5,575) 2020-08-21 07:24
https://issues.openbravo.com/file_download.php?file_id=14884&type=bug
Issue History
2020-08-04 09:18guillermogilNew Issue
2020-08-04 09:18guillermogilAssigned To => Retail
2020-08-04 09:18guillermogilResolution time => 1598306400
2020-08-04 09:18guillermogilTriggers an Emergency Pack => No
2020-08-04 09:18guillermogilTag Attached: Performance
2020-08-04 09:20guillermogilSummaryLogin time too long => Login time too high
2020-08-04 09:20guillermogilDescription Updatedbug_revision_view_page.php?rev_id=21443#r21443
2020-08-04 14:49marvintmNote Added: 0121808
2020-08-04 14:52marvintmFile Added: performanceFixForDiscountsCache.txt
2020-08-12 05:16prakashmurugesan88Assigned ToRetail => prakashmurugesan88
2020-08-18 08:06hgbotNote Added: 0122118
2020-08-18 08:07prakashmurugesan88Statusnew => scheduled
2020-08-19 07:27prakashmurugesan88File Added: I44746_Bytotal.patch
2020-08-19 07:27prakashmurugesan88File Added: I44746_Combo.patch
2020-08-19 07:27prakashmurugesan88File Added: I44746_ScaledPrice.patch
2020-08-19 07:32marvintmFile Deleted: performanceFixForDiscountsCache.txt
2020-08-19 07:38prakashmurugesan88File Added: I44746_Posterminal.patch
2020-08-19 07:46prakashmurugesan88Statusscheduled => resolved
2020-08-19 07:46prakashmurugesan88Resolutionopen => fixed
2020-08-19 08:12marvintmStatusresolved => new
2020-08-19 08:12marvintmResolutionfixed => open
2020-08-19 08:12marvintmStatusnew => scheduled
2020-08-20 06:19marvintmStatusscheduled => acknowledged
2020-08-20 06:19marvintmStatusacknowledged => scheduled
2020-08-20 06:21marvintmReview Assigned To => marvintm
2020-08-20 06:21marvintmNote Added: 0122193
2020-08-20 06:21marvintmStatusscheduled => closed
2020-08-20 06:21marvintmResolutionopen => no change required
2020-08-21 07:22prakashmurugesan88File Deleted: I44746_Posterminal.patch
2020-08-21 07:22prakashmurugesan88File Deleted: I44746_ScaledPrice.patch
2020-08-21 07:23prakashmurugesan88File Deleted: I44746_Combo.patch
2020-08-21 07:23prakashmurugesan88File Deleted: I44746_Bytotal.patch
2020-08-21 07:24prakashmurugesan88File Added: I44746_ScaledPrice_V2.patch
2020-08-21 07:24prakashmurugesan88File Added: I44746_Combo_V2.patch
2020-08-21 07:24prakashmurugesan88File Added: I44746_ByTotal_V2.patch
2020-08-24 06:47marvintmRelationship addedhas duplicate 0044846
2020-09-04 08:12marvintmSeveritymajor => critical

Notes
(0121808)
marvintm   
2020-08-04 14:49   
Several important details to consider for this issue:
- It only happens in the old WebSQL implementation, and not in IndexedDB
- The performance problem mainly comes from the Backbone transformation. I have attached a proof-of-concept fix idea that should be implemented for all queries in the initCache function of the discounts cache initialisation.
(0122118)
hgbot   
2020-08-18 08:06   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/61 [^]
(0122193)
marvintm   
2020-08-20 06:21   
In the current version, the code causing the problem does not longer exist, so we are closing the main issue. However, we have created a backport for 20Q2 release (when the problem still exists) and we will fix it there.