Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033015Openbravo ERPA. Platformpublic2016-05-20 11:042017-06-20 02:13
caristu 
caristu 
highmajorN/A
closedfixed 
5
 
3.0PR16Q3 
alostale
Core
No
0033015: Performance Improvements in Product Selector
The Product (by Price and Warehouse) selector has performance problems in environments with big amount of data, specially in those with a lot of records in the following tables: m_product, m_product_price, m_warehouse, m_storage_detail and m_storage_pending.

Together with this, some improvements can be applied to selectors in general, in order to have a better performance:

1) Apply default filtering criteria for FK using ID
2) Retrieve just the necessary properties for the selector drop-down requests
3) Unnecessary query is performed in the selector datasource when sending the targetRecordId parameter with null value.
4) If possible, apply inner join instead of left join for those properties used for sorting the results returned by the datasource.

Project Link: http://wiki.openbravo.com/wiki/Projects:Selector_Performance_Improvements [^]
In description.
Performance
related to defect 00317693.0PR16Q3 closed NaroaIriarte Unneeded left joins in DefaultJsonDataService 
related to defect 0032911 acknowledged Triage Platform Base Wrong selector request after refreshing the browser 
related to defect 0033569 closed NaroaIriarte [RR16Q3][HighVol] Product selector is pretty slow in a Store Server configuration 
related to defect 0052980 closed Triage Omni WMS database view m_product_warehouse_qtys_v is unused and should be removed 
causes defect 0035073 closed inigosanchez Fetching data when it is sorting by a null foreign key is not working as expected. 
causes defect 0036268 closed caristu Product Complete selector does not show some fields on picklist 
Issue History
2016-05-20 11:04caristuNew Issue
2016-05-20 11:04caristuAssigned To => caristu
2016-05-20 11:04caristuModules => Core
2016-05-20 11:04caristuTriggers an Emergency Pack => No
2016-05-20 11:27caristuTag Attached: Performance
2016-05-20 14:38caristuDescription Updatedbug_revision_view_page.php?rev_id=12189#r12189
2016-05-23 10:34caristuStatusnew => scheduled
2016-05-23 10:36caristuRelationship addedrelated to 0031769
2016-05-24 08:52hgbotCheckin
2016-05-24 08:52hgbotNote Added: 0086692
2016-05-24 08:52hgbotStatusscheduled => resolved
2016-05-24 08:52hgbotResolutionopen => fixed
2016-05-24 08:52hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/9105dfe33d79e5b7ba39a2680064f7c48c402701 [^]
2016-05-24 08:55caristuReview Assigned To => alostale
2016-05-24 08:55caristuIssue Monitored: alostale
2016-05-25 13:46hgbotCheckin
2016-05-25 13:46hgbotNote Added: 0086742
2016-05-30 12:22caristuRelationship addedrelated to 0032911
2016-05-31 08:14alostaleNote Added: 0086846
2016-05-31 08:14alostaleStatusresolved => closed
2016-05-31 08:14alostaleFixed in Version => 3.0PR16Q3
2016-06-17 19:37hudsonbotCheckin
2016-06-17 19:37hudsonbotNote Added: 0087559
2016-06-17 19:37hudsonbotCheckin
2016-06-17 19:37hudsonbotNote Added: 0087568
2016-12-07 09:36NaroaIriarteRelationship addedrelated to 0033569
2017-05-05 11:14inigosanchezRelationship addedcauses 0035073
2017-06-20 02:13inigosanchezRelationship addedcauses 0036268
2023-07-17 11:09shuehnerRelationship addedrelated to 0052980

Notes
(0086692)
hgbot   
2016-05-24 08:52   
Repository: erp/devel/pi
Changeset: 9105dfe33d79e5b7ba39a2680064f7c48c402701
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue May 24 08:50:54 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/9105dfe33d79e5b7ba39a2680064f7c48c402701 [^]

fixes issue 33015: Performance Improvements in Product Selector

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/templates/application-js.ftl
M modules/org.openbravo.service.datasource/web/org.openbravo.service.datasource/js/ob-datasource-utilities.js
M modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
M modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorConstants.java
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorDefaultFilterActionHandler.java
M modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
M src-db/database/model/views/M_PRODUCT_PRICE_WAREHOUSE_V.xml
---
(0086742)
hgbot   
2016-05-25 13:46   
Repository: erp/devel/pi
Changeset: 18a6a3a82814f7a80632c32d90480b1ac9b481f3
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed May 25 13:45:25 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/18a6a3a82814f7a80632c32d90480b1ac9b481f3 [^]

related to issue 33015: prevent warning on DefaultJsonDataService

After reopening the selector pop-up having a selected record, a bad request was being identified by the DefaultJsonDataService: the request included the _targetRecordId parameter but the _directNavigation parameter was not present.

This was happening because the selection information was not being cleared by the changes introduced on the openSelectorWindow function. Before [1], this cleaning was done by the invalidateCache method. Now we are cleaning the selection by explicitly calling to deselectAllRecords().

[1] http://code.openbravo.com/erp/devel/pi/rev/9105dfe33d79e5b7ba39a2680064f7c48c402701 [^]

---
M modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
---
(0086846)
alostale   
2016-05-31 08:14   
code reviewed and tested as part of the project
(0087559)
hudsonbot   
2016-06-17 19:37   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/0dc7be081b1c [^]
Maturity status: Test
(0087568)
hudsonbot   
2016-06-17 19:37   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/0dc7be081b1c [^]
Maturity status: Test