Openbravo Issue Tracking System - Openbravo ERP | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0033601 | Openbravo ERP | A. Platform | public | 2016-08-02 15:18 | 2016-09-02 13:25 |
Reporter | shuehner | ||||
Assigned To | NaroaIriarte | ||||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | 3.0PR16Q4 | |||
Merge Request Status | |||||
Review Assigned To | alostale | ||||
OBNetwork customer | No | ||||
Web browser | |||||
Modules | Core | ||||
Support ticket | |||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0033601: Preferences.getPreferenceValue is doing useless extra db-reads (missing getProxy) | ||||
Description | On first look this function is missing some getProxy usage to avoid db reads. proxy is fine as only pk value is used. public static String getPreferenceValue(String property, boolean isListProperty, String strClient, String strOrg, String strUser, String strRole, String strWindow) throws PropertyException { However checking that function it only calls next function having Client,Organization etc as objects as parameter just to extract the id again to use it. So maybe swap around those functions do put real content inside the functions having id's and use the other one as the wrapper | ||||
Steps To Reproduce | Client client = OBDal.getInstance().get(Client.class, strClient == null ? "" : strClient); Organization org = OBDal.getInstance().get(Organization.class, strOrg == null ? "" : strOrg); User user = OBDal.getInstance().get(User.class, strUser == null ? "" : strUser); Role role = OBDal.getInstance().get(Role.class, strRole == null ? "" : strRole); Window window = OBDal.getInstance().get(Window.class, strWindow == null ? "" : strWindow); are all missing getProxy NOTE: take care about that strange '== null' checks in there just to then: String clientId = client == null ? null : (String) DalUtil.getId(client); String orgId = org == null ? null : (String) DalUtil.getId(org); String userId = user == null ? null : (String) DalUtil.getId(user); String roleId = role == null ? null : (String) DalUtil.getId(role); String windowId = window == null ? null : (String) DalUtil.getId(window); Note: Those DalUtil.getId are already simplified to be use .getId() in tip of pi. | ||||
Proposed Solution | |||||
Additional Information | |||||
Tags | Performance | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2016-08-02 15:18 | shuehner | New Issue | |||
2016-08-02 15:18 | shuehner | Assigned To | => platform | ||
2016-08-02 15:18 | shuehner | OBNetwork customer | => No | ||
2016-08-02 15:18 | shuehner | Modules | => Core | ||
2016-08-02 15:18 | shuehner | Triggers an Emergency Pack | => No | ||
2016-08-02 15:18 | shuehner | Tag Attached: Performance | |||
2016-08-29 09:19 | alostale | Status | new => scheduled | ||
2016-08-29 09:19 | alostale | Assigned To | platform => NaroaIriarte | ||
2016-08-31 11:12 | hgbot | Checkin | |||
2016-08-31 11:12 | hgbot | Note Added: 0089589 | |||
2016-08-31 11:12 | hgbot | Status | scheduled => resolved | ||
2016-08-31 11:12 | hgbot | Resolution | open => fixed | ||
2016-08-31 11:12 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/938e3500425d8128135e96ea4bf0e97ac0aea493 [^] | ||
2016-09-01 12:12 | hudsonbot | Checkin | |||
2016-09-01 12:12 | hudsonbot | Note Added: 0089647 | |||
2016-09-02 13:25 | alostale | Review Assigned To | => alostale | ||
2016-09-02 13:25 | alostale | Note Added: 0089701 | |||
2016-09-02 13:25 | alostale | Status | resolved => closed | ||
2016-09-02 13:25 | alostale | Fixed in Version | => 3.0PR16Q4 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|