Project:
| View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
| ID | ||||||||||||
| 0033602 | ||||||||||||
| Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
| defect | [Openbravo ERP] 09. Financial management | minor | have not tried | 2016-08-02 15:36 | 2016-08-02 15:51 | |||||||
| Reporter | shuehner | View Status | public | |||||||||
| Assigned To | Triage Omni OMS | |||||||||||
| Priority | normal | Resolution | open | Fixed in Version | ||||||||
| Status | new | Fix in branch | Fixed in SCM revision | |||||||||
| Projection | none | ETA | none | Target Version | ||||||||
| OS | Any | Database | Any | Java version | ||||||||
| OS Version | Database version | Ant version | ||||||||||
| Product Version | SCM revision | |||||||||||
| Merge Request Status | ||||||||||||
| Review Assigned To | ||||||||||||
| 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 | 0033602: LoginUtils.fillSessionArguments (query Attribute.selectOrgCurrency quite slow) around 100ms with many orgs | |||||||||||
| Description | In bigger db with 524 organization the query from selectOrgCurrency can be quite slow with runtime around 100ms Problem is that it runs the ad_isorgincluded for all organizations whose runtime sums up a lot. Looking at the query it seems that only values from ad_org which is input and any parent orgs are of interest. Assuming that is correct adding a filter of the ad_org id's of all parents can speed up the query a lot. As the caller in fillSessionArguments did already construct the OrgTree that parent info is easily accessible. Note: Had to open up access to getAscendantTree from private to package level access to use it (note before+after still not part of public api so change should be fine). Attached patch seems to work given the assumption mentioned above is correct. But only very lightly tested. | |||||||||||
| Steps To Reproduce | - | |||||||||||
| Tags | Performance | |||||||||||
| Attached Files | ||||||||||||
Relationships [ Relation Graph ]
[ Dependency Graph ]
|
||||||||||||||||||||||
|
||||||||||||||||||||||
Notes |
|
|
(0088754) shuehner (administrator) 2016-08-02 15:51 |
Note: Same problem + maybe same solution some 20 lines later in fillSessionArguments in this code List<String> orgList = Arrays.asList(Utility .getContext(conn, vars, "#User_Org", "LoginHandler").replace("'", "").split(",")); String acctSchemaId = OBLedgerUtils.getOrgsLedger(orgList); takes 200ms each time select organizati1_.C_Acctschema_ID as col_0_0_ from AD_Org organizati0_ cross join AD_Org organizati1_ where (organizati0_.AD_Org_ID in (? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ?)) and ad_isorgincluded(organizati0_.AD_Org_ID, organizati1_.AD_Org_ID, organizati0_.AD_Client_ID)<>-1 and (organizati1_.C_Acctschema_ID is not null) and organizati1_.IsActive='Y' order by ad_isorgincluded(organizati0_.AD_Org_ID, organizati1_.AD_Org_ID, organizati0_.AD_Client_ID) limit ? As list is 524 orgs long in my testcase |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2016-08-02 15:36 | shuehner | New Issue | |
| 2016-08-02 15:36 | shuehner | Assigned To | => Triage Finance |
| 2016-08-02 15:36 | shuehner | OBNetwork customer | => No |
| 2016-08-02 15:36 | shuehner | Modules | => Core |
| 2016-08-02 15:36 | shuehner | Triggers an Emergency Pack | => No |
| 2016-08-02 15:36 | shuehner | Tag Attached: Performance | |
| 2016-08-02 15:37 | shuehner | File Added: 33602_prototype.diff | |
| 2016-08-02 15:51 | shuehner | Note Added: 0088754 | |
| 2016-08-12 12:04 | dmitry_mezentsev | Relationship added | related to 0033650 |
| 2016-08-23 14:56 | shuehner | Relationship added | related to 0033605 |
| 2017-11-10 11:21 | caristu | Relationship added | related to 0035989 |
| Copyright © 2000 - 2009 MantisBT Group |