Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033989Openbravo ERPI. Performancepublic2016-09-14 13:292016-09-19 16:27
gorkaion 
gorkaion 
normalminorhave not tried
closedfixed 
5
 
3.0PR16Q4 
aferraz
Core
No
0033989: Slow login loading organization's default ledgers
On a system with +200 organizations the login can take more than 2 seconds. In particular OBLedgerUtils.getOrgLedgerRecursive() method's query takes more 1.5 seconds.
On a system with +200 organizations try to login.
Check that the mentioned method takes too much time by adding some logs or measuring it with YourKit.
remove the query that filters and order by slow ad_isorgincluded procedure
No tags attached.
related to defect 0033681 scheduled nonofrancisco General Ledger's field default value should be modified in GL Journal Header and Tax Payment windows 
related to defect 0033040 closed Sanjota Unhomogeneous behavior depending on Org Access when role is defined at "Organization" user level 
related to feature request 0033650 closed AtulOpenbravo Add columns in AD_Org table to persist data in order to improve performance 
depends on backport 00340103.0PR16Q3.2 closed gorkaion Slow login loading organization's default ledgers 
depends on backport 00340153.0PR16Q2.3 closed gorkaion Slow login loading organization's default ledgers 
Issue History
2016-09-14 13:29gorkaionNew Issue
2016-09-14 13:29gorkaionAssigned To => gorkaion
2016-09-14 13:29gorkaionModules => Core
2016-09-14 13:29gorkaionTriggers an Emergency Pack => No
2016-09-15 12:50shuehnerRelationship addedrelated to 0033650
2016-09-16 10:06aferrazRelationship deletedrelated to 0033650
2016-09-16 10:06aferrazRelationship addeddepends on 0033650
2016-09-16 10:09aferrazRelationship addedrelated to 0033681
2016-09-16 10:32aferrazRelationship addedrelated to 0033040
2016-09-16 10:33aferrazRelationship deleteddepends on 0033650
2016-09-16 10:33aferrazRelationship addedrelated to 0033650
2016-09-16 10:38aferrazStatusnew => scheduled
2016-09-19 11:23hgbotCheckin
2016-09-19 11:23hgbotNote Added: 0090050
2016-09-19 11:23hgbotStatusscheduled => resolved
2016-09-19 11:23hgbotResolutionopen => fixed
2016-09-19 11:23hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/dcaf5195237ab27b1d8b9017894d625d9d6cadb6 [^]
2016-09-19 11:23hgbotCheckin
2016-09-19 11:23hgbotNote Added: 0090051
2016-09-19 11:26aferrazReview Assigned To => aferraz
2016-09-19 11:26aferrazNote Added: 0090054
2016-09-19 11:26aferrazStatusresolved => closed
2016-09-19 11:26aferrazFixed in Version => 3.0PR16Q4
2016-09-19 11:30aferrazStatusclosed => new
2016-09-19 11:30aferrazResolutionfixed => open
2016-09-19 11:30aferrazFixed in Version3.0PR16Q4 =>
2016-09-19 11:30aferrazStatusnew => scheduled
2016-09-19 11:30aferrazStatusscheduled => resolved
2016-09-19 11:30aferrazFixed in Version => 3.0PR16Q4
2016-09-19 11:30aferrazResolutionopen => fixed
2016-09-19 11:30aferrazStatusresolved => closed
2016-09-19 16:27hudsonbotCheckin
2016-09-19 16:27hudsonbotNote Added: 0090074
2016-09-19 16:27hudsonbotCheckin
2016-09-19 16:27hudsonbotNote Added: 0090075

Notes
(0090050)
hgbot   
2016-09-19 11:23   
Repository: erp/devel/pi
Changeset: dcaf5195237ab27b1d8b9017894d625d9d6cadb6
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Wed Sep 14 13:39:12 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/dcaf5195237ab27b1d8b9017894d625d9d6cadb6 [^]

Fixed issue 33989. Removed slow query getting Organization Ledger.

The method to get the default General Ledget was using a query that filtered
and sorted the results using ad_isorgincluded procedure. In case of having a
large number of organizations this query was slow.

The method is now using the OrganizationStructureProvider to get the parent
organization List of the required org to search the default General Ledger.

---
M src/org/openbravo/erpCommon/utility/OBLedgerUtils.java
---
(0090051)
hgbot   
2016-09-19 11:23   
Repository: erp/devel/pi
Changeset: 018192ddfcb3dc8bb0897cadab692f72c49dc10c
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Sep 19 11:14:46 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/018192ddfcb3dc8bb0897cadab692f72c49dc10c [^]

Related to issue 33989: Code review improvements

- Avoid setting admin mode in getOrgLedgerRecursive() and getClientLedger() methods as it is already done in getOrgLedger() method in OBLedgerUtils class.
- Retrieve first, general ledger of login organization in LoginUtils class. If no result is retrieved, we will retrieve general ledger of rest of context organizations.

---
M src/org/openbravo/base/secureApp/LoginUtils.java
M src/org/openbravo/erpCommon/utility/OBLedgerUtils.java
---
(0090054)
aferraz   
2016-09-19 11:26   
Code review + Testing OK
(0090074)
hudsonbot   
2016-09-19 16:27   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/17da7ad0ad62 [^]
Maturity status: Test
(0090075)
hudsonbot   
2016-09-19 16:27   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/17da7ad0ad62 [^]
Maturity status: Test