Openbravo Issue Tracking System - Retail Modules
View Issue Details
0033644Retail ModulesWeb POSpublic2016-08-07 11:132017-01-17 17:23
mtaal 
Retail 
normalminorhave not tried
newopen 
5
 
 
No
0033644: Too many preference queries, this while preferences are cached in the http session already
When using WebPOS there are many places where a query for preferences is done for the current user, code like this [1].
In addition while logging in all preferences are read/queried [2].

This can also all be read from the session as all preferences are already loaded in the session also [3].


[1]
https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/6de25cf75f58/src/org/openbravo/retail/posterminal/master/Product.java#l76 [^]

[2]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/0b3137a4bb61/src/org/openbravo/mobile/core/login/RolePermissions.java#l122 [^]

[3]
https://code.openbravo.com/erp/devel/pi/file/ae1076c7e9ea/src/org/openbravo/base/secureApp/LoginUtils.java#l332 [^]
Enable sql logging
Login to webpos
check how many preference queries are being done
Add a method to the Preferences class to read a preference for the current user.
When logging in then instead of calling getAllPreferences, read the preferences which are already present in the session.
No tags attached.
diff rolepermission-diff-not-applied.diff (4,133) 2016-08-07 11:38
https://issues.openbravo.com/file_download.php?file_id=9686&type=bug
diff 33644-posterminal.diff (22,318) 2016-08-07 12:03
https://issues.openbravo.com/file_download.php?file_id=9689&type=bug
diff 33644-mobile-core.diff (2,495) 2016-08-07 12:03
https://issues.openbravo.com/file_download.php?file_id=9690&type=bug
diff 33644-erp-core.diff (3,375) 2016-08-07 12:03
https://issues.openbravo.com/file_download.php?file_id=9691&type=bug
Issue History
2016-08-07 11:13mtaalNew Issue
2016-08-07 11:13mtaalAssigned To => mtaal
2016-08-07 11:13mtaalTriggers an Emergency Pack => No
2016-08-07 11:33mtaalNote Added: 0088866
2016-08-07 11:38mtaalFile Added: rolepermission-diff-not-applied.diff
2016-08-07 12:03mtaalFile Added: 33644-posterminal.diff
2016-08-07 12:03mtaalFile Added: 33644-mobile-core.diff
2016-08-07 12:03mtaalFile Added: 33644-erp-core.diff
2016-08-31 01:18mtaalTarget VersionRR16Q4 =>
2017-01-17 17:23mtaalAssigned Tomtaal => Retail

Notes
(0088866)
mtaal   
2016-08-07 11:33   
Note: it does not seem possible right away to replace the getAllPreferences in the RolePermission class. This because the preference name is cached in upper case in the http session, while the webpos client uses them in their original mixed casing.