Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035729Openbravo ERP09. Financial managementpublic2017-04-07 12:202017-05-29 17:43
JONHM 
alostale 
highmajoralways
closedfixed 
5
 
3.0PR17Q3 
caristu
Core
No
0035729: Performance issue in Financial Account when having high number of Organizations
Creating a new record into [Payment Method] tab of Financial Account takes more than a minute. It seems to happen because the environment have a 1.3K organizations.
Ask environment to JONHM (16Q2)
1) Open 'Financial Account' window and select record with name 'Org622_FA1007'
2) Switch to [Payment Method] subtab and click on NEW record
  -> It takes ~1min the UI to turn on editable (during this time a request to FIC is being processed).
Performance
related to feature request 00355903.0PR17Q3 closed vmromanos AD_IsOrgIncluded performance improvements 
related to design defect 0035909 closed alostale accessible organizations is calculated once per column in FIC 
depends on defect 0033605 closed shuehner OrgTree.getAccessibleTree is very slow with many organizations 
related to feature request 0037980 closed alostale Improve organization cache in session 
causes defect 0035916 closed alostale TestComboDatasource fails 
? slowBehavior.mp4 (1,147,080) 2017-04-07 12:20
https://issues.openbravo.com/file_download.php?file_id=10655&type=bug
png Selection_176.png (104,016) 2017-05-02 15:43
https://issues.openbravo.com/file_download.php?file_id=10705&type=bug
png

png Selection_177.png (50,678) 2017-05-02 15:44
https://issues.openbravo.com/file_download.php?file_id=10706&type=bug
png
Issue History
2017-04-07 12:20JONHMNew Issue
2017-04-07 12:20JONHMAssigned To => Triage Finance
2017-04-07 12:20JONHMFile Added: slowBehavior.mp4
2017-04-07 12:20JONHMModules => Core
2017-04-07 12:20JONHMResolution time => 1493330400
2017-04-07 12:20JONHMTriggers an Emergency Pack => No
2017-04-10 14:45aferrazAssigned ToTriage Finance => markmm82
2017-04-10 14:46aferrazRelationship addedrelated to 0035590
2017-04-25 21:29markmm82Statusnew => scheduled
2017-05-02 12:55aferrazNote Added: 0096304
2017-05-02 12:55aferrazAssigned Tomarkmm82 => platform
2017-05-02 12:55aferrazStatusscheduled => feedback
2017-05-02 12:55aferrazStatusfeedback => new
2017-05-02 15:42alostaleNote Added: 0096317
2017-05-02 15:43alostaleFile Added: Selection_176.png
2017-05-02 15:44alostaleFile Added: Selection_177.png
2017-05-02 15:44alostaleNote Edited: 0096317bug_revision_view_page.php?bugnote_id=0096317#r15088
2017-05-03 10:34alostaleTag Attached: Performance
2017-05-03 10:35alostaleStatusnew => scheduled
2017-05-03 10:35alostaleAssigned Toplatform => alostale
2017-05-03 14:07alostaleRelationship addeddepends on 0033605
2017-05-03 14:10alostaleDescription Updatedbug_revision_view_page.php?rev_id=15102#r15102
2017-05-03 14:10alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=15104#r15104
2017-05-03 14:17alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=15105#r15105
2017-05-03 14:17hgbotCheckin
2017-05-03 14:17hgbotNote Added: 0096344
2017-05-03 14:17hgbotStatusscheduled => resolved
2017-05-03 14:17hgbotResolutionopen => fixed
2017-05-03 14:17hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d9446ef6dac015006bff72fbc4787357b59b8a7e [^]
2017-05-03 14:19alostaleNote Added: 0096345
2017-05-03 14:27alostaleRelationship addedrelated to 0035909
2017-05-03 16:10shuehnerIssue Monitored: shuehner
2017-05-04 09:11alostaleRelationship addedcauses 0035916
2017-05-04 10:02hgbotCheckin
2017-05-04 10:02hgbotNote Added: 0096372
2017-05-05 07:34alostaleReview Assigned To => caristu
2017-05-09 10:33caristuNote Added: 0096479
2017-05-09 10:33caristuStatusresolved => closed
2017-05-09 10:33caristuFixed in Version => 3.0PR17Q3
2017-05-29 17:43hudsonbotCheckin
2017-05-29 17:43hudsonbotNote Added: 0096930
2017-05-29 17:43hudsonbotCheckin
2017-05-29 17:43hudsonbotNote Added: 0096935
2018-02-20 17:14alostaleRelationship addedrelated to 0037980

Notes
(0096304)
aferraz   
2017-05-02 12:55   
Problem seems to be in FormInitializationComponent:
DEBUG org.openbravo.client.application.window.FormInitializationComponent - Elapsed time: 44852(26,0,3,0,24499,20315,0,1,0,2)
(t6 - t5) -> computeColumnValues -> 24499
(t7 - t6) -> executeCallouts and computeAuxiliaryInputs -> 20315

There are no auxiliary inputs defined for this tab.
There are no complex default values.
There is only one callout (SE_PaymentMethod) which only takes around 2 ms to be executed.
(0096317)
alostale   
2017-05-02 15:42   
(edited on: 2017-05-02 15:44)
Profiling application:
* FIC in NEW takes 56s, inside it Utility.getReferencableOrg consumed 55.5s

No slow DB queries were seen

(0096344)
hgbot   
2017-05-03 14:17   
Repository: erp/devel/pi
Changeset: d9446ef6dac015006bff72fbc4787357b59b8a7e
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed May 03 14:15:41 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d9446ef6dac015006bff72fbc4787357b59b8a7e [^]

fixed bug 35729: OrgTree.getAccessibleTree is slow with many organizations

  Added some minor refactors on top of what was done for 0035590:
   * When inserting nodes, just prepend them, don't add position
   * Simplified some loops with for each statements
   * Improved toString method preventing String concatenations

---
M src/org/openbravo/base/secureApp/OrgTree.java
---
(0096345)
alostale   
2017-05-03 14:19   
* Main improvements were already implemented in 16Q4 by fix for 0033605, which reduce FIC time from 55s to 1.2s.
* In addition to them, current patch reduces from 1.2s to 500ms.
(0096372)
hgbot   
2017-05-04 10:02   
Repository: erp/devel/pi
Changeset: 761ac217cc3a395b2d27edefb249e866bcc7da90
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu May 04 09:55:58 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/761ac217cc3a395b2d27edefb249e866bcc7da90 [^]

related to bug 35729: some clean up in OrgTree

  1. getDescendantTreeList had 2 boolean params which were always set to true,
     so they have been removed
  2. Removed also some code duplication

---
M src/org/openbravo/base/secureApp/OrgTree.java
---
(0096479)
caristu   
2017-05-09 10:33   
Reviewed
(0096930)
hudsonbot   
2017-05-29 17:43   
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/1ee70113bdc4 [^]
Maturity status: Test
(0096935)
hudsonbot   
2017-05-29 17:43   
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/1ee70113bdc4 [^]
Maturity status: Test