Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0033186 | Openbravo ERP | A. Platform | public | 2016-06-07 20:37 | 2016-06-10 12:00 | |||||||
Reporter | shuehner | |||||||||||
Assigned To | shuehner | |||||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | |||||||
Status | closed | Resolution | fixed | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | Fixed in Version | 3.0PR16Q3 | ||||||||||
Merge Request Status | ||||||||||||
Review Assigned To | alostale | |||||||||||
OBNetwork customer | No | |||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
Support ticket | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0033186: OBContext.setReadableOrganizations loads tons of Organization objects into DAL session | |||||||||||
Description | Triggered via. OrderLoader -> initializeVariables -> Preferences.getPreferenceValue -> OBQuery.addOrgClientActiveFilter -> obContext.getReadableOrganizations() -> setReadableOrganizations. Issue is essentially getOrganizationList getOrganizations both query database and return list of DAL Organization objects which are thus loaded into current DAL session and kept until next .clear() However reviewing example users of those lists setReadableOrganizations shows that those DAL objects are not really needed as full objects but simple String of id is enough. Prototyping to replace the 2 functions to return 'o.id' in HQL query shows directly a drop of number of Organizations in DAL session from >=300 down to 1 Note: Patch is proof of concept only but shows the improvement in number of dal objects in session in the single tested flow. Patch has both proof of concept + debugging code to debug-print number of objects in session | |||||||||||
Steps To Reproduce | - | |||||||||||
Proposed Solution | ||||||||||||
Additional Information | ||||||||||||
Tags | Performance | |||||||||||
Relationships |
| |||||||||||
Attached Files | ![]() https://issues.openbravo.com/file_download.php?file_id=9502&type=bug ![]() https://issues.openbravo.com/file_download.php?file_id=9509&type=bug | |||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2016-06-07 20:37 | shuehner | New Issue | ||||||||||
2016-06-07 20:37 | shuehner | Assigned To | => platform | |||||||||
2016-06-07 20:37 | shuehner | OBNetwork customer | => No | |||||||||
2016-06-07 20:37 | shuehner | Modules | => Core | |||||||||
2016-06-07 20:37 | shuehner | Triggers an Emergency Pack | => No | |||||||||
2016-06-07 20:37 | shuehner | Tag Attached: Performance | ||||||||||
2016-06-07 20:37 | shuehner | File Added: 33186.diff | ||||||||||
2016-06-07 21:14 | shuehner | Relationship added | related to 0033187 | |||||||||
2016-06-08 23:10 | shuehner | File Added: 33186_v2.diff | ||||||||||
2016-06-08 23:10 | shuehner | Note Added: 0087102 | ||||||||||
2016-06-10 11:46 | alostale | Assigned To | platform => shuehner | |||||||||
2016-06-10 11:46 | alostale | Review Assigned To | => alostale | |||||||||
2016-06-10 11:55 | hgbot | Checkin | ||||||||||
2016-06-10 11:55 | hgbot | Note Added: 0087148 | ||||||||||
2016-06-10 11:55 | hgbot | Status | new => resolved | |||||||||
2016-06-10 11:55 | hgbot | Resolution | open => fixed | |||||||||
2016-06-10 11:55 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/1f8eba41e1f1f21e38311d4ac934f2890e8e0ee5 [^] | |||||||||
2016-06-10 12:00 | alostale | Note Added: 0087150 | ||||||||||
2016-06-10 12:00 | alostale | Status | resolved => closed | |||||||||
2016-06-10 12:00 | alostale | Fixed in Version | => 3.0PR16Q3 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|