Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0033186 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | minor | have not tried | 2016-06-07 20:37 | 2016-06-10 12:00 | |||
Reporter | shuehner | View Status | public | |||||
Assigned To | shuehner | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR16Q3 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 1f8eba41e1f1 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
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 | - | |||||||
Tags | Performance | |||||||
Attached Files | ![]() ![]() | |||||||
![]() |
||||||||
|
![]() |
|
(0087102) shuehner (administrator) 2016-06-08 23:10 |
Attached cleanup version of the prototype patch without lots of testing + debugging code |
(0087148) hgbot (developer) 2016-06-10 11:55 |
Repository: erp/devel/pi Changeset: 1f8eba41e1f1f21e38311d4ac934f2890e8e0ee5 Author: Stefan Hühner <stefan.huehner <at> openbravo.com> Date: Fri Jun 10 11:53:53 2016 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/1f8eba41e1f1f21e38311d4ac934f2890e8e0ee5 [^] fixed 33186: OBContext.setReadableOrganizations loads Org objects in session OBContext.setReadableOrganizations, invoked on session creation, loaded full DAL Organization objects in session. This caused slowness while loading and in subsequent DAL flushes. Now instead of loading full DAL objects, only ids are fetched from DB, in this manner initialization is faster and flushes don't get affected. --- M src/org/openbravo/dal/core/OBContext.java --- |
(0087150) alostale (viewer) 2016-06-10 12:00 |
code reviewed tested: - now when those organization objects are not seen anymore when flushing in order loader |
![]() |
|||
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 |
Copyright © 2000 - 2009 MantisBT Group |