Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0033605 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | minor | have not tried | 2016-08-02 17:26 | 2016-10-14 09:19 | |||
Reporter | shuehner | View Status | public | |||||
Assigned To | shuehner | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR16Q4 | |||
Status | closed | Fix in branch | Fixed in SCM revision | fbbbd0d5bd13 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | caristu | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0033605: OrgTree.getAccessibleTree is very slow with many organizations | |||||||
Description | This function is very slow >1s in a system with many orgs (524). Most of that slowdown comes from bad coding of loops here. - for (int i = 0; i < nodes.toArray().length; i++) { + for (int i = 0; i < nodes.size(); i++) { In many functions of that class to get to the size of a java.util.list the above is used which create a new array from the list to get to the size of that tmp array and throws it away. As that is being done very very often in the calculation it a major pain point. Just changing that like shown in the above diff drops runtime from >1s down to 50ms | |||||||
Steps To Reproduce | Trigger above code in a system with i.e. 524 orgs. Found in flow POSLoginHandler (which runs fillSessionArguments which runs above function) | |||||||
Tags | Performance | |||||||
Attached Files | 33605_prototype.diff [^] (3,113 bytes) 2016-08-02 17:27 [Show Content] | |||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||
|
Notes | |
(0089307) hgbot (developer) 2016-08-23 15:30 |
Repository: erp/devel/pi Changeset: fbbbd0d5bd13f0a59455446e0de48dd9a5a4b576 Author: Stefan Hühner <stefan.huehner <at> openbravo.com> Date: Tue Aug 23 15:29:22 2016 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/fbbbd0d5bd13f0a59455446e0de48dd9a5a4b576 [^] Fixed 33605. Simplify & speedup OrgTree functions with many organizations. Code in OrgTree.java used strange pattern to loop over its internal (Array)List of notes. - for (int i = 0; i < nodes.toArray().length; i++) { + for (int i = 0; i < nodes.size(); i++) { That makes code harder to read and create/copy of those temporary arrays has a noticable performanc cost in a system with many organizations. --- M src/org/openbravo/base/secureApp/OrgTree.java --- |
(0089380) caristu (developer) 2016-08-25 10:39 |
Code reviewed |
Issue History | |||
Date Modified | Username | Field | Change |
2016-08-02 17:26 | shuehner | New Issue | |
2016-08-02 17:26 | shuehner | Assigned To | => platform |
2016-08-02 17:26 | shuehner | Modules | => Core |
2016-08-02 17:26 | shuehner | Triggers an Emergency Pack | => No |
2016-08-02 17:27 | shuehner | File Added: 33605_prototype.diff | |
2016-08-11 20:09 | shuehner | Tag Attached: Performance | |
2016-08-23 14:56 | shuehner | Relationship added | related to 0033602 |
2016-08-23 15:04 | shuehner | Review Assigned To | => caristu |
2016-08-23 15:30 | hgbot | Checkin | |
2016-08-23 15:30 | hgbot | Note Added: 0089307 | |
2016-08-23 15:30 | hgbot | Status | new => resolved |
2016-08-23 15:30 | hgbot | Resolution | open => fixed |
2016-08-23 15:30 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/fbbbd0d5bd13f0a59455446e0de48dd9a5a4b576 [^] |
2016-08-25 10:39 | caristu | Note Added: 0089380 | |
2016-08-25 10:39 | caristu | Status | resolved => closed |
2016-08-25 10:39 | caristu | Fixed in Version | => 3.0PR16Q4 |
2016-10-14 09:19 | alostale | Assigned To | platform => shuehner |
2017-05-03 14:07 | alostale | Relationship added | blocks 0035729 |
Copyright © 2000 - 2009 MantisBT Group |