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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0037457
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] 01. General setupmajorhave not tried2017-11-13 10:092017-12-12 12:11
ReporterSandrahuguetView Statuspublic 
Assigned ToAtulOpenbravo 
PrioritynormalResolutionfixedFixed in Version3.0PR17Q3.2
StatusclosedFix in branchFixed in SCM revisionbaf748b24ea4
ProjectionnoneETAnoneTarget Version3.0PR17Q3.2
OSLinux 64 bitDatabasePostgreSQLJava version7.x
OS VersionOpenbravo Appliance 14.04Database version9.3.xAnt version1.9.x
Product VersionSCM revision 
Review Assigned Tovmromanos
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0037457: Change the role in the ERP has performance problems

DescriptionIn 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 ReproduceLogin in the ERP
Open developer tools
Change the role to a role with access to many organizations
Notice that UserInfoWidgetActionHandler request takes around 18s
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0037277 closedAtulOpenbravo Change the role in the ERP has performance problems 

-  Notes
(0100976)
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
(0100981)
hgbot (developer)
2017-12-12 12:09

Repository: erp/backports/3.0PR17Q3.2
Changeset: baf748b24ea45da057da3c9ce431013e1108fc3e
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Tue Dec 12 14:59:28 2017 +0530
URL: http://code.openbravo.com/erp/backports/3.0PR17Q3.2/rev/baf748b24ea45da057da3c9ce431013e1108fc3e [^]

Fixes Issue 37457: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.0PR17Q3.2
2017-12-12 10:20 AtulOpenbravo Note Added: 0100976
2017-12-12 12:09 hgbot Checkin
2017-12-12 12:09 hgbot Note Added: 0100981
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.0PR17Q3.2/rev/baf748b24ea45da057da3c9ce431013e1108fc3e [^]
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.0PR17Q3.2


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker