Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0025684
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] I. Performancecriticalhave not tried2014-02-07 08:112014-02-13 07:16
ReportershuehnerView Statuspublic 
Assigned Toalostale 
PriorityimmediateResolutionfixedFixed in Version3.0PR14Q2
StatusclosedFix in branchpiFixed in SCM revision001ce480684b
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version3.0MP22.2SCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0025684: FIC is calculating all vaues of combo's in several cases where it is not needed.

DescriptionDuring perf-debugging in a client we found 2 cases where the FIC is calculating list of values for (big) combo's where this is not needed.

It is known that this can be worked around by redefining the affected columns in the ad. But in this case this is a logic bug fic imho it should be fixed there.

Both cases have their logic in FIC function computeColumnValues around lines 555+ 576 (2 places affected)

a.) The logic in FIC is computing combo-values for all columns in case of mode=CHANGE, when visibleProperties is null.
This can be trigger in the UI when having open a window in form fiew, then switching to another openbravo window and coming back to the first window.
This coming back to first window, does trigger a FIC call in mode=change which does not have the visibleProperties object with values.

b.) The logic in FIC is taking into account isDisplayed, isShownInGrid, isShownInStatus and if none of those are set does not compute all values of a combo for this column. However this logic does not take into account isactive flag. So having a ad_field entry with isactive=n but isdisplayeD=Y does trigger computation of the combo.

The attached patch does implement the change a.) taken into account visibleProperties==null.
Also it adds some debugging code which makes it much easier to find out why a column has it combo-values calculated without needing to go into the ad to check all the flags manually.

AMO: has a prototype patch to implement part b.) which is also refactoring the if-logic a bit as it is very hard to read in its current form.


3.) part: Another idea to improve performance for fic combo-calculation
In case of a column not being visible sometimes it still needs the combo-values calculated to get a default-value to be used on inserts.
However in this case only a single value (the final default-value is needed).
Here the potentially big memory-spike of having all millions of combo values in memory can be avoided by adapting the logic.

AMO: has also a prototype patch to implement this part 3.)

Note: for the cases triggering oom's in the client a+b are sufficient to avoid the known cases.
However part 3.) should also be very useful to reduce memory consumption in other not yet observed cases.

NOTE: This is a candidate to be backported, but should get some extra maturing first.
Steps To Reproducesee Description of a+b above
Proposed Solutiona.) Change logic to disable the part of the if related to visibleProperties to make it in-effective in case of visibleProperties == null. The rest of the if-conditions still need to be executed !
b.) Change logic to also take isactive into account for the part of the if related to visibility only. The second part of the if regarding default values is different and may or not need to get the same change.
In the observed case the change would only be needed for the display part which should also be the safer option as it reduces the scope of the change.
TagsPerformance
Attached Filesdiff file icon fic_prototype_change_a.diff [^] (4,584 bytes) 2014-02-07 08:18 [Show Content]
diff file icon fix25684Part_b.diff [^] (3,118 bytes) 2014-02-07 12:16 [Show Content]
diff file icon fix25684Part_3.diff [^] (6,177 bytes) 2014-02-07 12:19 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0064079)
hgbot (developer)
2014-02-12 17:01

Repository: erp/devel/pi
Changeset: ed6df2f35307ff9c59d6cebeb1bf30f7c8f6c2db
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Feb 07 12:46:29 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/ed6df2f35307ff9c59d6cebeb1bf30f7c8f6c2db [^]

related to bug 25684: solves case a
  don't compute unneeded combos on CHANGE mode when visibleProperties is null

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
---
(0064080)
hgbot (developer)
2014-02-12 17:01

Repository: erp/devel/pi
Changeset: 6198177e1c6178d4467687c4963609a402540ba1
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Feb 07 13:00:18 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/6198177e1c6178d4467687c4963609a402540ba1 [^]

related to issue 25684: solves case b

  do not compute inactive combos if they are not required

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
---
(0064081)
hgbot (developer)
2014-02-12 17:01

Repository: erp/devel/pi
Changeset: 82bb222117bcdf35562698bb78177291116f8041
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Feb 07 13:01:43 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/82bb222117bcdf35562698bb78177291116f8041 [^]

related to issue 25684: solves case 3

  don't generate complete JSON for combos when only one value is required

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/FKComboUIDefinition.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinition.java
M src/org/openbravo/erpCommon/utility/ComboTableData.java
---
(0064082)
hgbot (developer)
2014-02-12 17:01

Repository: erp/devel/pi
Changeset: 001ce480684b29e5f8b839adc67d35d5bf48fa47
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Feb 11 10:55:13 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/001ce480684b29e5f8b839adc67d35d5bf48fa47 [^]

related to issue 25684: solves case 3

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinition.java
M src/org/openbravo/erpCommon/utility/ComboTableData.java
---
(0064083)
alostale (manager)
2014-02-12 17:10
edited on: 2014-02-12 17:13

Code reviewed.

Verified combos that are now not calculated or only their single record make sense.
Verified single record calculation returns the expected value.

Improvements tested in Sales Order window:
* Sales Order Header tab
  - 13 combos are not computed at all
  - 2 combos are calculated only one record
* Sales Order Line tab
  - 9 combos are not computed at all
  - 6 combos are calculated only one record

(0064201)
hudsonbot (developer)
2014-02-13 07:16

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/76fb3237bc3a [^]
Maturity status: Test
(0064202)
hudsonbot (developer)
2014-02-13 07:16

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/76fb3237bc3a [^]
Maturity status: Test
(0064203)
hudsonbot (developer)
2014-02-13 07:16

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/76fb3237bc3a [^]
Maturity status: Test
(0064204)
hudsonbot (developer)
2014-02-13 07:16

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/76fb3237bc3a [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2014-02-07 08:11 shuehner New Issue
2014-02-07 08:11 shuehner Assigned To => AugustoMauch
2014-02-07 08:11 shuehner Modules => Core
2014-02-07 08:11 shuehner Triggers an Emergency Pack => No
2014-02-07 08:14 alostale Tag Attached: Performance
2014-02-07 08:18 shuehner File Added: fic_prototype_change_a.diff
2014-02-07 12:05 alostale Assigned To AugustoMauch => alostale
2014-02-07 12:16 marvintm File Added: fix25684Part_b.diff
2014-02-07 12:19 marvintm File Added: fix25684Part_3.diff
2014-02-12 17:01 hgbot Checkin
2014-02-12 17:01 hgbot Note Added: 0064079
2014-02-12 17:01 hgbot Checkin
2014-02-12 17:01 hgbot Note Added: 0064080
2014-02-12 17:01 hgbot Checkin
2014-02-12 17:01 hgbot Note Added: 0064081
2014-02-12 17:01 hgbot Checkin
2014-02-12 17:01 hgbot Note Added: 0064082
2014-02-12 17:01 alostale Status new => scheduled
2014-02-12 17:01 alostale fix_in_branch => pi
2014-02-12 17:02 alostale Status scheduled => resolved
2014-02-12 17:02 alostale Fixed in Version => 3.0MP32
2014-02-12 17:02 alostale Fixed in SCM revision => https://code.openbravo.com/erp/devel/pi/rev/001ce480684b29e5f8b839adc67d35d5bf48fa47 [^]
2014-02-12 17:02 alostale Resolution open => fixed
2014-02-12 17:10 alostale Review Assigned To => alostale
2014-02-12 17:10 alostale Note Added: 0064083
2014-02-12 17:10 alostale Status resolved => closed
2014-02-12 17:12 alostale Status closed => new
2014-02-12 17:12 alostale Resolution fixed => open
2014-02-12 17:12 alostale Fixed in Version 3.0MP32 =>
2014-02-12 17:13 alostale Note Edited: 0064083 View Revisions
2014-02-12 17:13 alostale Status new => scheduled
2014-02-12 17:13 alostale Status scheduled => resolved
2014-02-12 17:13 alostale Resolution open => fixed
2014-02-12 17:13 alostale Status resolved => closed
2014-02-12 17:13 alostale Fixed in Version => 3.0MP32
2014-02-13 07:16 hudsonbot Checkin
2014-02-13 07:16 hudsonbot Note Added: 0064201
2014-02-13 07:16 hudsonbot Checkin
2014-02-13 07:16 hudsonbot Note Added: 0064202
2014-02-13 07:16 hudsonbot Checkin
2014-02-13 07:16 hudsonbot Note Added: 0064203
2014-02-13 07:16 hudsonbot Checkin
2014-02-13 07:16 hudsonbot Note Added: 0064204


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker