Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035989Openbravo ERPA. Platformpublic2017-05-15 10:182022-02-01 08:08
caristu 
Triage Platform Base 
highminorN/A
acknowledgedopen 
5
 
 
Core
No
0035989: Default session values calculation on login is slow having a big amount of organizations
The calculation of the default session values (values for the table with a 'is default' column) on login is slow having a big amount of organizations
1) In an environment with 1000 organizations at least, do log-in.
2) Check the amount of time spent in the LoginUtils class when calculating the default values:

DefaultSessionValuesData[] ds = DefaultSessionValuesData.select(conn);

Notice that the calculation of the default values inside the LoginUtils.fillSessionArguments method is expensive (see attached image with a performance screenshot)
Performance
related to feature request 0035553 closed caristu Improve scalability of the login process 
related to defect 0033602 new Triage Omni OMS LoginUtils.fillSessionArguments (query Attribute.selectOrgCurrency quite slow) around 100ms with many orgs 
related to design defect 0035990 new Triage Platform Base Sqlc calculates all records to retrieve later the first result 
png DefaultValuesPerfScreenshot.png (91,920) 2017-05-15 10:18
https://issues.openbravo.com/file_download.php?file_id=10756&type=bug
png
Issue History
2017-05-15 10:18caristuNew Issue
2017-05-15 10:18caristuAssigned To => platform
2017-05-15 10:18caristuModules => Core
2017-05-15 10:18caristuTriggers an Emergency Pack => No
2017-05-15 10:18caristuFile Added: DefaultValuesPerfScreenshot.png
2017-05-15 10:23caristuRelationship addedrelated to 0035990
2017-05-15 10:24caristuRelationship addedrelated to 0035553
2017-05-15 11:10caristuTag Attached: Performance
2017-05-29 13:08shuehnerIssue Monitored: shuehner
2017-11-10 11:21caristuRelationship addedrelated to 0033602
2017-11-22 12:37shuehnerNote Added: 0100664
2017-11-23 13:11caristuStatusnew => acknowledged
2017-11-23 13:11caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=16351#r16351
2022-02-01 08:08alostaleAssigned Toplatform => Triage Platform Base

Notes
(0100664)
shuehner   
2017-11-22 12:37   
Other related comments. Checking manually the output of that query i think in some cases it runs for table where i don't see a functional sense.

I.e. ad_model_object_mapping has a isdefault column however that is just default inside the parent entry ad_model_object. And that sql above apperently finds the primary key value for 'the' default row without context.
Which i doubt is useful (for that specific table).