Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0015193Openbravo ERP02. Master data managementpublic2010-11-15 18:012011-02-08 00:00
adrianromero 
marvintm 
urgentminoralways
closedfixed 
5
3.0RC2 
3.0RC4 
Core
No
0015193: Performance problem in role window when there are many warehouses defined
We have an application with more that 200 warehouses defined. When the user tries to open the role window (the first link in the menu), the window takes a lot of time.
- Create some warehouses (we have more that 200).
- Access to role information (first link in the menu)
- Notice that it takes a lot of time.

Note that the action save in this window takes a lot of time, too.
No tags attached.
blocks defect 00150642.50MP25 closed adrianromero Performance problem in role window when there are many warehouses defined 
Issue History
2010-11-15 18:01adrianromeroNew Issue
2010-11-15 18:01adrianromeroAssigned To => adrianromero
2010-11-15 18:01adrianromeroIssue generated from0015064
2010-11-15 18:01adrianromeroRelationship addedblocks 0015064
2010-11-15 18:32adrianromeroTarget Version => 3.0RC4
2010-11-17 20:17mtaalNote Added: 0032690
2010-11-17 20:17mtaalAssigned Toadrianromero => mtaal
2010-11-19 06:36mtaalNote Added: 0032723
2010-12-20 13:50adrianromeroSeveritymajor => minor
2010-12-20 13:50adrianromeroTypebackport => defect
2010-12-27 07:27alostaleStatusnew => scheduled
2011-01-12 12:29shuehnerIssue Monitored: shuehner
2011-01-24 18:51adrianromeroPriorityhigh => urgent
2011-02-03 09:48dalsasuaAssigned Tomtaal => marvintm
2011-02-07 12:01marvintmNote Added: 0034068
2011-02-07 12:01marvintmStatusscheduled => resolved
2011-02-07 12:01marvintmFixed in SCM revision => .
2011-02-07 12:01marvintmResolutionopen => fixed
2011-02-07 12:02marvintmStatusresolved => closed
2011-02-08 00:00anonymoussf_bug_id0 => 3175409

Notes
(0032690)
mtaal   
2010-11-17 20:17   
I am not sure if this is an issue, it can be. One thing is that the loading of the role info is done asynchronously while the application loads. So the user won't see a delay (unless he within a second after the application shows opens the role window). But still the server is hit and this may cause performance problems.

Tjhe querying in the new role window does this:
read all roles of one client
for each role read the organizations
for each role and all organizations (of that role), read all warehouses

So also in this case there can be many queries indeed. For example with 10 clients and 10 roles, there are:
100 queries for organizations
100 queries for warehouses

So a performance improvement would bring this down to two queries. for organizations and one for warehouses and do the linking of roles/organizations and warehouses on the server side.

Assigning it to myself for now.
(0032723)
mtaal   
2010-11-19 06:36   
Note that the above changes should be done in this class/method:
org.openbravo.client.application.navigationbarcomponents.UserInfoWidgetActionHandler
and this method:
executeDataCommand

The changes mean that only one or 2 queries should be used. The linking of the organization/warehouse to the correct role should then be done in memory instead of going through the database.

In addition the queries can be optimized a bit by not reading the complete object but only dedicated fields.

gr. Martin
(0034068)
marvintm   
2011-02-07 12:01   
Two different databases have been tested:

- One with a small number of organizations, and 3000 warehouses
- One with 50 organizations, and 50 warehouses each (so 2500 warehouses in total).

In both cases, the menu is very responsible and loads instantly, so no problems were detected in the 3.0 environment.