Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039340Openbravo ERPI. Performancepublic2018-09-21 22:062018-12-11 20:22
gsuarez 
AtulOpenbravo 
normalmajoralways
closedfixed 
30Openbravo Appliance 14.04
 
3.0PR19Q1 
Sandrahuguet
Core
No
0039340: Performance issue in Budget window.
In environments with high amounts of lines inside a budget when user tries to export this budget to Excel and the export actual data flag is checked, it can take several hours.
This is caused by the update actuals process, the java class associated with this process tries to create the account natural tree using the getChildTree method from the TreeUtility class, in turn this method calls the private initialize and if the amount of treeNodes to process is big then the whole process takes hours. It doesn't represents a heap or cpu problem as they remain stable.
In an environment with a budget with a high amount of lines (150) and a high amount of tree nodes in any of elements of the nodes of the natural tree (20000):
- Set the 'Export actual data' flag as true in the budget.
- Export the budget to Excel using the process in that window.
Performance
related to defect 0039461 closed AtulOpenbravo API Change: delete unused methods in TreeUtility 
Issue History
2018-09-21 22:06gsuarezNew Issue
2018-09-21 22:06gsuarezAssigned To => platform
2018-09-21 22:06gsuarezModules => Core
2018-09-21 22:06gsuarezResolution time => 1539295200
2018-09-21 22:06gsuarezTriggers an Emergency Pack => No
2018-09-24 10:47alostaleAssigned Toplatform => Triage Finance
2018-09-24 16:58SandrahuguetAssigned ToTriage Finance => AtulOpenbravo
2018-09-24 16:59SandrahuguetTag Attached: Performance
2018-10-02 17:57AtulOpenbravoStatusnew => scheduled
2018-10-15 12:22AtulOpenbravoNote Added: 0107297
2018-10-15 13:42hgbotCheckin
2018-10-15 13:42hgbotNote Added: 0107299
2018-10-15 13:42hgbotStatusscheduled => resolved
2018-10-15 13:42hgbotResolutionopen => fixed
2018-10-15 13:42hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/2c80088f99e598c8d0263718a9be18a31d2da611 [^]
2018-10-15 13:42hgbotCheckin
2018-10-15 13:42hgbotNote Added: 0107300
2018-10-15 13:42hgbotCheckin
2018-10-15 13:42hgbotNote Added: 0107301
2018-10-15 13:43SandrahuguetReview Assigned To => Sandrahuguet
2018-10-15 13:43SandrahuguetNote Added: 0107302
2018-10-15 13:43SandrahuguetStatusresolved => closed
2018-10-15 13:43SandrahuguetFixed in Version => 3.0PR19Q1
2018-10-16 16:16SandrahuguetRelationship addedrelated to 0039461
2018-10-26 12:14hgbotCheckin
2018-10-26 12:14hgbotNote Added: 0107618
2018-11-06 15:40hgbotCheckin
2018-11-06 15:40hgbotNote Added: 0107767
2018-12-11 20:22hudsonbotCheckin
2018-12-11 20:22hudsonbotNote Added: 0108428
2018-12-11 20:22hudsonbotCheckin
2018-12-11 20:22hudsonbotNote Added: 0108429
2018-12-11 20:22hudsonbotCheckin
2018-12-11 20:22hudsonbotNote Added: 0108430
2018-12-11 20:22hudsonbotCheckin
2018-12-11 20:22hudsonbotNote Added: 0108452

Notes
(0107297)
AtulOpenbravo   
2018-10-15 12:22   
Test Plan

- In a local environment having 178 elements in Account Tree "F&B International Group Account Account" & its tree "F&B International Group Element Value (Account, etc.)"

- In Budget window select "F&B US, Inc." as organization, Year 2018.
- Export Actual Data = Yes.
- In budget Line select Account = 1000 Assets, Currency EUR, Amount = 100.
- Click on Export Budget To Excel.

Before fix it takes approx. 1 mins and after the fix it takes approx. 1 sec.
(0107299)
hgbot   
2018-10-15 13:42   
Repository: erp/devel/pi
Changeset: 2c80088f99e598c8d0263718a9be18a31d2da611
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Mon Oct 15 08:56:15 2018 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/2c80088f99e598c8d0263718a9be18a31d2da611 [^]

Fixes Issue 0039340: Performance issue in Budget window.

** Use Deque to avoid repeatative exploring of elements
in the tree. Deprecate old methods getNaturalTree, getChildTree,
getChildNode, Define new methods getChildrenOf, getChildrenOfTreeNode

** Move fetching of trees and treenodes in separated methods
getTreeIdsFromTreeType & getTreeIdsFromTreeType respectively.

---
M src/org/openbravo/erpCommon/ad_process/UpdateActuals.java
M src/org/openbravo/erpCommon/utility/TreeUtility.java
---
(0107300)
hgbot   
2018-10-15 13:42   
Repository: erp/devel/pi
Changeset: 0ac854acbc99ed823b508899b26051d5eb3caf2c
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Mon Oct 15 15:30:30 2018 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/0ac854acbc99ed823b508899b26051d5eb3caf2c [^]

Related To Issue 39340:Performance in budget window when exporting to excel.

** Add year from budget header as filter in the query.
** Use StringUtils.equals to avoid NPE.
** Use braces in if loops to make code more readable.
** Avoid printStackTrace()

---
M src/org/openbravo/erpCommon/ad_process/UpdateActuals.java
M src/org/openbravo/erpCommon/ad_reports/ReportBudgetExportExcel.java
---
(0107301)
hgbot   
2018-10-15 13:42   
Repository: erp/devel/pi
Changeset: 2e0dfe691859df46aa1549f9f285d3cb1a0da16f
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Mon Oct 15 13:42:19 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/2e0dfe691859df46aa1549f9f285d3cb1a0da16f [^]

related to issue 39340 update Copyright year

---
M src/org/openbravo/erpCommon/ad_reports/ReportBudgetExportExcel.java
---
(0107302)
Sandrahuguet   
2018-10-15 13:43   
Code review + testing OK
(0107618)
hgbot   
2018-10-26 12:14   
Repository: erp/pmods/org.openbravo.materialmgmt.catalog
Changeset: 7d8e569372c81a190c8d1cbc7fa86804346110dd
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Tue Oct 16 11:49:59 2018 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.materialmgmt.catalog/rev/7d8e569372c81a190c8d1cbc7fa86804346110dd [^]

Related To Issue 39340:CI eclipse warnings

** Use getChildTree instead of getChildNode as it is deprecated.
** Add copyright information.

---
M src/org/openbravo/materialmgmt/catalog/CatalogTreeDataSource.java
---
(0107767)
hgbot   
2018-11-06 15:40   
Repository: erp/devel/pi
Changeset: 98b93929cdd342b7e2819cbec546e2711bbe9e1b
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Tue Oct 16 15:54:26 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/98b93929cdd342b7e2819cbec546e2711bbe9e1b [^]

related to issue 39340 delete deprecated methods and fix getChildNode

---
M src/org/openbravo/erpCommon/utility/TreeUtility.java
---
(0108428)
hudsonbot   
2018-12-11 20:22   
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/470e3cd384c5 [^]
Maturity status: Test
(0108429)
hudsonbot   
2018-12-11 20:22   
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/470e3cd384c5 [^]
Maturity status: Test
(0108430)
hudsonbot   
2018-12-11 20:22   
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/470e3cd384c5 [^]
Maturity status: Test
(0108452)
hudsonbot   
2018-12-11 20:22   
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/470e3cd384c5 [^]
Maturity status: Test