Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Revisions: Issue #37324 Back to Issue ]
Summary 0037324: slow login having many preferences
Revision 2017-11-20 13:00 by alostale
Description In a system with some thousands of preferences, depending on how they are distributed, login (both in back-office and POS) can last up to some seconds.

Two different cases detected with different configurations:

== Case 1: many visible preferences ==
Thousands of preferences visible from the client/org/role that is performing the login. Testing this case with 8K preferences defined at system level, login requests took up to 40s.

This case, even possible, it's a bit hypothetical, not that probable to occur in a real instance.

== Case 2: preferences defined in readable org, but not visible due to "visible at org" field ==
Having thousands of preferences defined on an organization that is in the parent tree of the one that is used for current login, login time takes up to extra 2s even those preferences are set as not visible through the "visible at org" field.

This case can occur for example in a real instance with many (in the steps emulating 500) organizations all of them children of a common parent. Preferences are defined in parent one, and visibility limited of each of the children.
Revision 2017-11-20 12:51 by alostale
Description In a system with some thousands of preferences, depending on how they are distributed, login (both in back-office and POS) can last up to some seconds.

Two different cases detected with different configurations:

== Case 1: many visible preferences ==
Thousands of preferences visible from the client/org/role that is performing the login. Testing this case with 8K preferences defined at system level, login requests took up to 40s.

== Case 2: preferences defined in readable org, but not visible due to "visible at org" field ==
Having thousands of preferences defined on an organization that is in the parent tree of the one that is used for current login, login time takes up to extra 2s even those preferences are set as not visible through the "visible at org" field.
Revision 2017-11-20 12:51 by alostale
Steps To Reproduce Following cases are reproducible in an instance with Openbravo for Retail installed.

1. case 1
1.1. Create 8K preferences at System level, visible from all roles:
  insert into ad_preference
    (ad_preference_id,  ad_client_id,      ad_org_id,
     createdby,         updatedby,         attribute,
     value,              ispropertylist)
    select get_uuid(),  '0',     '0',
           '0',         '0',     'visible-all-'||s, 
           'v:'||s,     'N'
      from generate_series(1,8000) s;

1.2. Login WebPOS
    -> It takes up to 40s to complete, note most of this time is spent at Preferneces.getPreferenceFromList (see Selection_230.png)

2. case 2
2.1. for each preference defined in WebPOS module, insert up to 500 instances, all of them with ad_org_id being in a common parent org (ie in The White Valley Group), but limiting visibility though visibleat_org_id to some no org not visible in login (ie. Central Mountains Store)

insert into ad_preference
            (ad_preference_id,  ad_client_id,      ad_org_id,         
             createdby,          updatedby,         property,         
             value,              ispropertylist,
             visibleat_org_id)
       slect get_uuid(), 
            '39363B0921BB4293B48383844325E84C', -- Client: The White Valley Group
            '67839EEFA49E44AC969BD60093FCC899', -- Org: The White Valley Group
            '0', '0',  value,
            'v:'||s, 'Y',
            '3B187EC130A549A7A9388F8060EF156D' -- visible at org: Central Mountains Store
       from ad_ref_list, generate_series(1,500) s
      where ad_module_id ='FF808181326CC34901326D53DBCF0018' 
        and ad_reference_id ='A26BA480E2014707B47257024C3CBFF7' -- all POS preferences     

2.2 login WebPOS with 'Demo user' on its default 'Vallblanca' organization, which cannot see 'Central Mountains Store'
  -> login request take up to 4s, in this case, time is spent in loading DAL objects in memory
Revision 2017-11-20 12:37 by alostale
Steps To Reproduce Following cases are reproducible in an instance with Openbravo for Retail installed.

1. case 1
1.1. Create 8K preferences at System level, visible from all roles:
  insert into ad_preference
    (ad_preference_id,  ad_client_id,      ad_org_id,
     createdby,         updatedby,         attribute,
     value,              ispropertylist)
    select get_uuid(),  '0',     '0',
           '0',         '0',     'visible-all-'||s, 
           'v:'||s,     'N'
      from generate_series(1,8000) s;

1.2. Login WebPOS
    -> It takes up to 40s to complete, note most of this time is spent at Preferneces.getPreferenceFromList (see Selection_230.png)

2. case 2
2.1. for each preference defined in WebPOS module, insert up to 500 instances, all of them with ad_org_id being in a common parent org (ie in The White Valley Group), but limiting visibility though visibleat_org_id to some no org not visible in login (ie. Central Mountains Store)

insert into ad_preference
            (ad_preference_id,  ad_client_id,      ad_org_id,         
             createdby,          updatedby,         property,         
             value,              ispropertylist,
             visibleat_org_id)
       slect get_uuid(), 
            '39363B0921BB4293B48383844325E84C', -- Client: The White Valley Group
            '67839EEFA49E44AC969BD60093FCC899', -- Org: The White Valley Group
            '0', '0',  value,
            'v:'||s, 'Y',
            '3B187EC130A549A7A9388F8060EF156D' -- visible at org: Central Mountains Store
       from ad_ref_list, generate_series(1,500) s
      where ad_module_id ='FF808181326CC34901326D53DBCF0018' 
        and ad_reference_id ='A26BA480E2014707B47257024C3CBFF7' -- all POS preferences     

2.2 login WebPOS with 'Demo user' on its default 'Vallblanca' organization, which cannot see 'Central Mountains Store'
  -> login request take up to 2s
Revision 2017-11-20 12:10 by alostale
Steps To Reproduce Following cases are reproducible in an instance with Openbravo for Retail installed.

1. case 1
1.1. Create 8K preferences at System level, visible from all roles:
  insert into ad_preference
    (ad_preference_id,  ad_client_id,      ad_org_id,
     createdby,         updatedby,         attribute,
     value,              ispropertylist)
    select get_uuid(),  '0',     '0',
           '0',         '0',     'visible-all-'||s, 
           'v:'||s,     'N'
      from generate_series(1,8000) s;

1.2. Login WebPOS
    -> It takes up to 40s to complete

2. case 2
2.1. for each preference defined in WebPOS module, insert up to 500 instances, all of them with ad_org_id being in a common parent org (ie in The White Valley Group), but limiting visibility though visibleat_org_id to some no org not visible in login (ie. Central Mountains Store)

insert into ad_preference
            (ad_preference_id,  ad_client_id,      ad_org_id,         
             createdby,          updatedby,         property,         
             value,              ispropertylist,
             visibleat_org_id)
       slect get_uuid(), 
            '39363B0921BB4293B48383844325E84C', -- Client: The White Valley Group
            '67839EEFA49E44AC969BD60093FCC899', -- Org: The White Valley Group
            '0', '0',  value,
            'v:'||s, 'Y',
            '3B187EC130A549A7A9388F8060EF156D' -- visible at org: Central Mountains Store
       from ad_ref_list, generate_series(1,500) s
      where ad_module_id ='FF808181326CC34901326D53DBCF0018' 
        and ad_reference_id ='A26BA480E2014707B47257024C3CBFF7' -- all POS preferences     

2.2 login WebPOS with 'Demo user' on its default 'Vallblanca' organization, which cannot see 'Central Mountains Store'
  -> login request take up to 2s
Revision 2017-11-20 12:08 by alostale
Steps To Reproduce Following cases are reproducible in an instance with Openbravo for Retail installed.

1. case 1
1.1. Create 8K preferences at System level, visible from all roles:
  insert into ad_preference
    (ad_preference_id,  ad_client_id,      ad_org_id,
     createdby,         updatedby,         attribute,
     value,              ispropertylist)
    select get_uuid(),  '0',     '0',
           '0',         '0',     'visible-all-'||s, 
           'v:'||s,     'N'
      from generate_series(1,8000) s;

1.2. Login WebPOS
    -> It takes up to 40s to complete

2. case 2
2.1. for each preference defined in WebPOS module, insert up to 500 instances, all of them with ad_org_id being in a common parent org (ie in The White Valley Group), but limiting visibility though visibleat_org_id to some no org not visible in login (ie. Central Mountains Store)

insert into ad_preference
            (ad_preference_id,  ad_client_id,      ad_org_id,         
             createdby,          updatedby,         property,         
             value,              ispropertylist,
             visibleat_org_id)
       slect get_uuid(), 
            '39363B0921BB4293B48383844325E84C', -- Client: The White Valley Group
            '67839EEFA49E44AC969BD60093FCC899', -- Org: The White Valley Group
            '0', '0',  value,
            'v:'||s, 'Y',
            '3B187EC130A549A7A9388F8060EF156D' -- visible at org: Central Mountains Store
       from ad_ref_list, generate_series(1,500) s
      where ad_module_id ='FF808181326CC34901326D53DBCF0018' 
        and ad_reference_id ='A26BA480E2014707B47257024C3CBFF7' -- all POS preferences     
Revision 2017-11-20 12:00 by alostale
Steps To Reproduce Following cases are reproducible in an instance with Openbravo for Retail installed.

1. case 1
1.1. Create 8K preferences at System level, visible from all roles:
  insert into ad_preference
    (ad_preference_id,  ad_client_id,      ad_org_id,
     createdby,         updatedby,         attribute,
     value,              ispropertylist)
    select get_uuid(),  '0',     '0',
           '0',         '0',     'visible-all-'||s, 
           'v:'||s,     'N'
      from generate_series(1,8000) s;

1.2. Login WebPOS
    -> It takes up to 40s to complete

2. case 2
2.1.
Revision 2017-11-20 11:59 by alostale
Steps To Reproduce Following cases are reproducible in an instance with Openbravo for Retail installed.

1. case 1
1.1. Create 8K preferences at System level, visible from all roles:
<code>
  insert into ad_preference
    (ad_preference_id, ad_client_id, ad_org_id,
     createdby, updatedby, attribute,
     value, ispropertylist)
    select get_uuid(), '0', '0',
           '0', '0', 'visible-all-'||s,
           'v:'||s, 'N'
      from generate_series(1,8000) s;
</code>


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker