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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0033644
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Retail Modules] Web POSminorhave not tried2016-08-07 11:132017-01-17 17:23
ReportermtaalView Statuspublic 
Assigned ToRetail 
PrioritynormalResolutionopenFixed in Version
StatusnewFix 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

0033644: Too many preference queries, this while preferences are cached in the http session already

DescriptionWhen 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 [^]
Steps To ReproduceEnable sql logging
Login to webpos
check how many preference queries are being done
Proposed SolutionAdd 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.
TagsNo tags attached.
Attached Filesdiff file icon rolepermission-diff-not-applied.diff [^] (4,133 bytes) 2016-08-07 11:38 [Show Content]
diff file icon 33644-posterminal.diff [^] (22,318 bytes) 2016-08-07 12:03 [Show Content]
diff file icon 33644-mobile-core.diff [^] (2,495 bytes) 2016-08-07 12:03 [Show Content]
diff file icon 33644-erp-core.diff [^] (3,375 bytes) 2016-08-07 12:03 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0088866)
mtaal (manager)
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.

- Issue History
Date Modified Username Field Change
2016-08-07 11:13 mtaal New Issue
2016-08-07 11:13 mtaal Assigned To => mtaal
2016-08-07 11:13 mtaal Triggers an Emergency Pack => No
2016-08-07 11:33 mtaal Note Added: 0088866
2016-08-07 11:38 mtaal File Added: rolepermission-diff-not-applied.diff
2016-08-07 12:03 mtaal File Added: 33644-posterminal.diff
2016-08-07 12:03 mtaal File Added: 33644-mobile-core.diff
2016-08-07 12:03 mtaal File Added: 33644-erp-core.diff
2016-08-31 01:18 mtaal Target Version RR16Q4 =>
2017-01-17 17:23 mtaal Assigned To mtaal => Retail


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker