Openbravo Issue Tracking System - Openbravo ERP | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0025684 | Openbravo ERP | I. Performance | public | 2014-02-07 08:11 | 2014-02-13 07:16 |
Reporter | shuehner | ||||
Assigned To | alostale | ||||
Priority | immediate | Severity | critical | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Platform | OS | 5 | OS Version | ||
Product Version | 3.0MP22.2 | ||||
Target Version | Fixed in Version | 3.0PR14Q2 | |||
Merge Request Status | |||||
Review Assigned To | alostale | ||||
OBNetwork customer | OBPS | ||||
Web browser | |||||
Modules | Core | ||||
Support ticket | |||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0025684: FIC is calculating all vaues of combo's in several cases where it is not needed. | ||||
Description | During 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 Reproduce | see Description of a+b above | ||||
Proposed Solution | a.) 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. | ||||
Additional Information | |||||
Tags | Performance | ||||
Relationships | |||||
Attached Files | ![]() https://issues.openbravo.com/file_download.php?file_id=6691&type=bug ![]() https://issues.openbravo.com/file_download.php?file_id=6692&type=bug ![]() https://issues.openbravo.com/file_download.php?file_id=6693&type=bug | ||||
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 | OBNetwork customer | => Yes | ||
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 | bug_revision_view_page.php?bugnote_id=0064083#r5443 | ||
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 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|