Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0033812 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
backport | [Openbravo ERP] A. Platform | minor | have not tried | 2016-08-24 11:41 | 2016-08-29 15:13 | |||
Reporter | shuehner | View Status | public | |||||
Assigned To | aferraz | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR16Q2.3 | |||
Status | closed | Fix in branch | Fixed in SCM revision | f4d5cad9480c | ||||
Projection | none | ETA | none | Target Version | 3.0PR16Q2.3 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | caristu | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0033812: 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 | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0089498) hgbot (developer) 2016-08-29 14:20 |
Repository: erp/backports/3.0PR16Q2.3 Changeset: f4d5cad9480cbfca055032ab1f86d7ff4e7e310f Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com> Date: Thu Aug 25 15:16:24 2016 +0200 URL: http://code.openbravo.com/erp/backports/3.0PR16Q2.3/rev/f4d5cad9480cbfca055032ab1f86d7ff4e7e310f [^] Fixed 33812. 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 --- |
(0089506) caristu (developer) 2016-08-29 15:13 |
Code reviewed |
Issue History | |||
Date Modified | Username | Field | Change |
2016-08-25 14:25 | aferraz | Type | defect => backport |
2016-08-25 14:25 | aferraz | Target Version | => 3.0PR16Q2.3 |
2016-08-29 13:09 | aferraz | Assigned To | shuehner => aferraz |
2016-08-29 14:20 | hgbot | Checkin | |
2016-08-29 14:20 | hgbot | Note Added: 0089498 | |
2016-08-29 14:20 | hgbot | Status | scheduled => resolved |
2016-08-29 14:20 | hgbot | Resolution | open => fixed |
2016-08-29 14:20 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/c35e5b050f0baa6289ac1cb8c4b17fac389591c3 [^] => http://code.openbravo.com/erp/backports/3.0PR16Q2.3/rev/f4d5cad9480cbfca055032ab1f86d7ff4e7e310f [^] |
2016-08-29 15:13 | caristu | Note Added: 0089506 | |
2016-08-29 15:13 | caristu | Status | resolved => closed |
2016-08-29 15:13 | caristu | Fixed in Version | => 3.0PR16Q2.3 |
Copyright © 2000 - 2009 MantisBT Group |