Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035909Openbravo ERPA. Platformpublic2017-05-03 14:272017-05-29 17:43
alostale 
alostale 
normalmajorhave not tried
closedfixed 
5
 
3.0PR17Q3 
caristu
Core
No
0035909: accessible organizations is calculated once per column in FIC
Creating new records having many organizations can be slow due to FIC request. The main problem is caused when computing default values for combo fields, where accessible organizations is calculated once per field.
- Follow steps described in 0035729
- Adding debug information can be seen for this concrete case the same calculation for accesible organizations is performed up to 23 times. Each of them taking ~18ms.
FIC should calculate accessible organizations once, and reuse it for all columns in the same request.
Performance
related to defect 0035729 closed alostale Performance issue in Financial Account when having high number of Organizations 
Issue History
2017-05-03 14:27alostaleNew Issue
2017-05-03 14:27alostaleAssigned To => platform
2017-05-03 14:27alostaleModules => Core
2017-05-03 14:27alostaleTriggers an Emergency Pack => No
2017-05-03 14:27alostaleRelationship addedrelated to 0035729
2017-05-03 14:35alostaleTag Attached: Performance
2017-05-03 16:11shuehnerIssue Monitored: shuehner
2017-05-10 10:49alostaleReview Assigned To => caristu
2017-05-10 10:49alostaleAssigned Toplatform => alostale
2017-05-10 10:53hgbotCheckin
2017-05-10 10:53hgbotNote Added: 0096503
2017-05-10 10:53hgbotStatusnew => resolved
2017-05-10 10:53hgbotResolutionopen => fixed
2017-05-10 10:53hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/0edfa4a627104f47e6141db673580230795e6878 [^]
2017-05-10 10:55alostaleNote Added: 0096504
2017-05-12 12:31caristuNote Added: 0096558
2017-05-12 12:31caristuStatusresolved => closed
2017-05-12 12:31caristuFixed in Version => 3.0PR17Q3
2017-05-29 17:43hudsonbotCheckin
2017-05-29 17:43hudsonbotNote Added: 0096952

Notes
(0096503)
hgbot   
2017-05-10 10:53   
Repository: erp/devel/pi
Changeset: 0edfa4a627104f47e6141db673580230795e6878
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri May 05 11:34:45 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/0edfa4a627104f47e6141db673580230795e6878 [^]

fixed issue 35909: accessible organizations is calculated per column in FIC

  Whenver FIC was exectued, accessible organization list was computed for each
  drop down column. The only parameter for this list is the organization of the
  current record, so the result will be the same for all columns. Being this a
  potentially heavy operation, it can result in slow FIC requests.

  Now the list is cached in OrgTree which is cached in session, so the list of
  referenceable organizations is only computed the first time it gets used per
  organization within the whole session.

---
M src/org/openbravo/base/secureApp/OrgTree.java
M src/org/openbravo/erpCommon/utility/Utility.java
---
(0096504)
alostale   
2017-05-10 10:55   
Patch tested with the same data and steps as reported in 0035729.

Time reduces from 500ms to 55ms.
(0096558)
caristu   
2017-05-12 12:31   
Code reviewed + tested OK.

Tested in pi@70fd32d0bf5b
(0096952)
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