Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0037456 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
backport | [Openbravo ERP] 01. General setup | major | have not tried | 2017-11-13 10:09 | 2017-12-12 12:11 | |||
Reporter | Sandrahuguet | View Status | public | |||||
Assigned To | AtulOpenbravo | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR17Q4 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 272695c75c88 | ||||
Projection | none | ETA | none | Target Version | 3.0PR17Q4 | |||
OS | Linux 64 bit | Database | PostgreSQL | Java version | 7.x | |||
OS Version | Openbravo Appliance 14.04 | Database version | 9.3.x | Ant version | 1.9.x | |||
Product Version | SCM revision | |||||||
Review Assigned To | vmromanos | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0037456: Change the role in the ERP has performance problems | |||||||
Description | In an environment with many organizations, get General Ledger of context organizations part in LoginUtils.java (specifically, the loop by organization and selectAcctSchema inside) is very slow (takes around 17s). slow part: // Get General Ledger of context organizations if (ArrayUtils.isEmpty(attr)) { String[] orgList = Utility.getContext(conn, vars, "#User_Org", "LoginHandler") .replace("'", "").split(","); for (String orgId : orgList) { if (!StringUtils.equals(orgId, strOrg)) { acctSchemaId = OBLedgerUtils.getOrgLedger(orgId); if (StringUtils.isNotEmpty(acctSchemaId)) { attr = AttributeData.selectAcctSchema(conn, acctSchemaId, Utility.getContext(conn, vars, "#User_Client", "LoginHandler")); if (ArrayUtils.isNotEmpty(attr)) { break; } } } } } | |||||||
Steps To Reproduce | Login in the ERP Open developer tools Change the role to a role with access to many organizations Notice that UserInfoWidgetActionHandler request takes around 18s | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0100975) AtulOpenbravo (developer) 2017-12-12 10:20 |
Time logs in local instance with similar setup as in client environment 500+ organizations with General Ledger having no dimensions or no active dimensions defined. Before any Fix At first login Time taken to fetch general ledger of context org (ms):- 426 Time taken to fetch general ledger of context org (ms):- 464 Changing role from System Admin to Client Admin Run#1 Time taken to fetch general ledger of context org (ms):- 7587 Run#2 Time taken to fetch general ledger of context org (ms):- 7191 Run#3 Time taken to fetch general ledger of context org (ms):- 7134 Run#4 Time taken to fetch general ledger of context org (ms):- 6800 GUI: ~ 8.5 to 9 seconds After Fix issue-37277.diff At first login Time taken to fetch general ledger of context org (ms):- 448 Time taken to fetch general ledger of context org (ms):- 537 Changing role from System Admin to Client Admin Run#1 Time taken to fetch general ledger of context org (ms):- 215 Org count visited..541 Run#2 Time taken to fetch general ledger of context org (ms):- 196 Org count visited..541 Run#3 Time taken to fetch general ledger of context org (ms):- 213 Org count visited..541 Run#4 Time taken to fetch general ledger of context org (ms):- 153 Org count visited..541 GUI: ~ 2.5 to 3 seconds With both the fixes At first login Total Time (ms): General Ledger of context organizations: 110 Changing role from System Admin to Client Admin Run#1 Total Time (ms): General Ledger of context organizations: 97 Run#2 Total Time (ms): General Ledger of context organizations: 73 Run#3 Total Time (ms): General Ledger of context organizations: 55 Run#4 Total Time (ms): General Ledger of context organizations: 54 GUI: ~ 2 to 2.5 seconds |
(0100980) hgbot (developer) 2017-12-12 12:09 |
Repository: erp/backports/3.0PR17Q4 Changeset: 272695c75c880b0a9bdc11c83f78a04b1bb16d35 Author: Atul Gaware <atul.gaware <at> openbravo.com> Date: Tue Dec 12 15:00:06 2017 +0530 URL: http://code.openbravo.com/erp/backports/3.0PR17Q4/rev/272695c75c880b0a9bdc11c83f78a04b1bb16d35 [^] Fixes Issue 37456:Change the role in the ERP has performance problems ** Flush is called before calling fillSessionArguments ** new ConnectionProvider without flush is passed to the fillSessionArguments method which avoids flush for every select statement which uses this connection Provider as flush is not need for select statements. --- M modules/org.openbravo.client.application/src/org/openbravo/client/application/navigationbarcomponents/UserInfoWidgetActionHandler.java --- |
Issue History | |||
Date Modified | Username | Field | Change |
2017-12-12 10:17 | AtulOpenbravo | Type | defect => backport |
2017-12-12 10:17 | AtulOpenbravo | Target Version | => 3.0PR17Q4 |
2017-12-12 10:20 | AtulOpenbravo | Note Added: 0100975 | |
2017-12-12 12:09 | hgbot | Checkin | |
2017-12-12 12:09 | hgbot | Note Added: 0100980 | |
2017-12-12 12:09 | hgbot | Status | scheduled => resolved |
2017-12-12 12:09 | hgbot | Resolution | open => fixed |
2017-12-12 12:09 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/backports/3.0PR17Q4/rev/272695c75c880b0a9bdc11c83f78a04b1bb16d35 [^] |
2017-12-12 12:11 | vmromanos | Review Assigned To | => vmromanos |
2017-12-12 12:11 | vmromanos | Status | resolved => closed |
2017-12-12 12:11 | vmromanos | Fixed in Version | => 3.0PR17Q4 |
Copyright © 2000 - 2009 MantisBT Group |