Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033195Openbravo ERPA. Platformpublic2016-06-08 16:482022-02-01 08:05
shuehner 
Triage Platform Base 
highminorhave not tried
acknowledgedopen 
5
 
 
Core
No
0033195: OBContext.initialize loading many objects from database. Review if some loads can be optimized away
Reviewing SQL's done during insert into c_import_entry (i.e. via pos orderloader).

All the following SQL's were found to happen and all seems to come from OBContext.initialze (so probably at least once per http request)

Example flow starts from ImportEntryProcessor.setOBContext in case context is not yet cached.

1.) via OBContext.initialize()
select aduser0_.AD_User_ID
select adlanguage0_.AD_Language_ID
select adclient0_.AD_Client_ID
select adlanguage0_.AD_Language_ID
select organizati0_.AD_Org_ID
select warehouse0_.M_Warehouse
select adrole0_.AD_Role_ID_
select adrole0_.AD_Role_ID
select organizati0_.AD_Org_ID
select organizati0_.AD_Org_ID
select adclient0_.AD_Client_ID
select clientinfo0_.AD_Client_ID
select count(*) as col_0_0_ from AD_Language

Review if all loads are really needed or can be removed.
If all are needed maybe some sharing can be done in case input param (id requested is same for several loads of same table).

Also the last one (count from ad_language) is checking 'issystemlanguage='Y' which does probably not need to be repeated over and over again
-
Performance
Issue History
2016-06-08 16:48shuehnerNew Issue
2016-06-08 16:48shuehnerAssigned To => platform
2016-06-08 16:48shuehnerModules => Core
2016-06-08 16:48shuehnerTriggers an Emergency Pack => No
2016-06-08 16:48shuehnerTag Attached: Performance
2016-07-15 09:58alostaleStatusnew => acknowledged
2016-12-01 14:05alostalePrioritynormal => urgent
2016-12-01 14:05alostalePriorityurgent => high
2022-02-01 08:05alostaleAssigned Toplatform => Triage Platform Base

There are no notes attached to this issue.