Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033704Openbravo ERPA. Platformpublic2016-08-12 17:072016-08-24 15:35
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
 
3.0PR16Q4 
caristu
Core
No
0033704: Accidental double query in 'selector dropdown' of new style selectors
The SelectorDataSourceFilter class does call .count() + then .list() on a OBCriteria running the sql query twice once with count(*) + then again to list the fields
1.) Sales Order window
2.) new in form view
3.) open selector 'dropdown' of business partner selector
4.) review queries done in step 3
-
Performance
related to defect 0033706 closed shuehner SelectorDataSourceFilter does accidental extra queries in 'Add Payment' flow of Sales Orders 
related to feature request 0033767 closed platform Add code to auto-detect 'accidental double query' on same OBQuery or OBCriteria object 
related to defect 0033772 closed shuehner Accidental double query in SelectorDefaultFilterActionHandler 
related to design defect 0036898 new Triage Finance Performance issues when using DAL 
Issue History
2016-08-12 17:07shuehnerNew Issue
2016-08-12 17:07shuehnerAssigned To => shuehner
2016-08-12 17:07shuehnerModules => Core
2016-08-12 17:07shuehnerTriggers an Emergency Pack => No
2016-08-12 17:36shuehnerRelationship addedrelated to 0033706
2016-08-12 18:09shuehnerTag Attached: Performance
2016-08-23 14:32hgbotCheckin
2016-08-23 14:32hgbotNote Added: 0089302
2016-08-23 14:32hgbotStatusnew => resolved
2016-08-23 14:32hgbotResolutionopen => fixed
2016-08-23 14:32hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4289cc0c51368d9fc41140ccb650f6130cdefc84 [^]
2016-08-23 14:34shuehnerReview Assigned To => caristu
2016-08-23 14:44shuehnerRelationship addedrelated to 0033767
2016-08-23 17:20shuehnerRelationship addedrelated to 0033772
2016-08-24 15:35caristuNote Added: 0089351
2016-08-24 15:35caristuStatusresolved => closed
2016-08-24 15:35caristuFixed in Version => 3.0PR16Q4
2017-09-19 18:49markmm82Relationship addedrelated to 0036898

Notes
(0089302)
hgbot   
2016-08-23 14:32   
Repository: erp/devel/pi
Changeset: 4289cc0c51368d9fc41140ccb650f6130cdefc84
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Fri Aug 12 17:08:13 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/4289cc0c51368d9fc41140ccb650f6130cdefc84 [^]

Fixed 33704. Remove double query by saving .list() result

instead of calling .count() and then .list() which does 2 selects for the same.

---
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorDataSourceFilter.java
---
(0089351)
caristu   
2016-08-24 15:35   
Code review + testing OK: when opening the drop-down selector now one query is used to retrieve the selector fields when applying the default expressions.