Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0033790 | Openbravo ERP | A. Platform | public | 2016-08-24 11:41 | 2016-08-25 22:53 |
|
Reporter | shuehner | |
Assigned To | shuehner | |
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR16Q4 | |
Merge Request Status | |
Review Assigned To | caristu |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0033790: Accidental double query in PriceListVersionFilterExpressionName (order lines, product selector dropdown) |
Description | That class has double query m_pricelist_version and also is missing a limit 1 so could lead to high mem usage.
Note: Code seems to be very similar or identical to the change reported in issue 33705 |
Steps To Reproduce | with debugging code from https://issues.openbravo.com/view.php?id=33767 [^]
Open Sales Order
create new header
In lines tab
Create new record in grid view
Click on product selector drop down and see debugging code fire |
Proposed Solution | |
Additional Information | |
Tags | Performance |
Relationships | related to | defect | 0033705 | | closed | shuehner | Double query in PricelistVersionFilterExpression (product selector) | related to | feature request | 0033767 | | closed | platform | Add code to auto-detect 'accidental double query' on same OBQuery or OBCriteria object | related to | defect | 0033791 | | acknowledged | Triage Finance | PricelistVersionFilterExpression & PriceListVersionFilterExpressionName are 99% identical | depends on | backport | 0033811 | 3.0PR16Q3.1 | closed | aferraz | Accidental double query in PriceListVersionFilterExpressionName (order lines, product selector dropdown) | depends on | backport | 0033812 | 3.0PR16Q2.3 | closed | aferraz | Accidental double query in PriceListVersionFilterExpressionName (order lines, product selector dropdown) |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2016-08-24 11:41 | shuehner | New Issue | |
2016-08-24 11:41 | shuehner | Assigned To | => platform |
2016-08-24 11:41 | shuehner | Modules | => Core |
2016-08-24 11:41 | shuehner | Triggers an Emergency Pack | => No |
2016-08-24 11:41 | shuehner | Tag Attached: Performance | |
2016-08-24 11:41 | shuehner | Relationship added | related to 0033705 |
2016-08-24 11:41 | shuehner | Relationship added | related to 0033767 |
2016-08-24 11:47 | shuehner | Relationship added | related to 0033791 |
2016-08-24 11:55 | hgbot | Checkin | |
2016-08-24 11:55 | hgbot | Note Added: 0089338 | |
2016-08-24 11:55 | hgbot | Status | new => resolved |
2016-08-24 11:55 | hgbot | Resolution | open => fixed |
2016-08-24 11:55 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/c35e5b050f0baa6289ac1cb8c4b17fac389591c3 [^] |
2016-08-24 11:55 | shuehner | Review Assigned To | => caristu |
2016-08-24 15:00 | shuehner | Assigned To | platform => shuehner |
2016-08-25 10:45 | caristu | Note Added: 0089384 | |
2016-08-25 10:45 | caristu | Status | resolved => closed |
2016-08-25 10:45 | caristu | Fixed in Version | => 3.0PR16Q4 |
2016-08-25 14:20 | aferraz | Status | closed => new |
2016-08-25 14:20 | aferraz | Resolution | fixed => open |
2016-08-25 14:20 | aferraz | Fixed in Version | 3.0PR16Q4 => |
2016-08-25 14:25 | aferraz | Status | new => scheduled |
2016-08-25 14:26 | aferraz | Status | scheduled => resolved |
2016-08-25 14:26 | aferraz | Fixed in Version | => 3.0PR16Q4 |
2016-08-25 14:26 | aferraz | Resolution | open => fixed |
2016-08-25 14:26 | aferraz | Status | resolved => closed |
2016-08-25 15:11 | hgbot | Checkin | |
2016-08-25 15:11 | hgbot | Note Added: 0089402 | |
2016-08-25 22:53 | hudsonbot | Checkin | |
2016-08-25 22:53 | hudsonbot | Note Added: 0089418 | |
Notes |
|
(0089338)
|
hgbot
|
2016-08-24 11:55
|
|
Repository: erp/devel/pi
Changeset: c35e5b050f0baa6289ac1cb8c4b17fac389591c3
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Wed Aug 24 11:54:52 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/c35e5b050f0baa6289ac1cb8c4b17fac389591c3 [^]
Fixed 33790. Avoid double query with .count() + .list(). Add limit 1 to query
Query did .count() + then retrieve 1 record after adding extra order by.
This change removes the count as it only adds extra overhead and directly
does the real .list() query.
As the code only uses single row of result add extra limit 1 to reduce
number of result rows loaded into memory if many match the filter.
Simply code to use .uniqueResult() instead of .list().get(0)
---
M src/org/openbravo/erpCommon/info/PriceListVersionFilterExpressionName.java
---
|
|
|
|
|
|
(0089402)
|
hgbot
|
2016-08-25 15:11
|
|
|
|
|
|