Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0028477 | Openbravo ERP | A. Platform | public | 2014-12-23 15:51 | 2015-11-27 10:33 |
|
Reporter | alostale | |
Assigned To | alostale | |
Priority | high | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR16Q1 | |
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 | 0028477: view generation: unneeded queries to trl tables |
Description | When standard views are generated, translation tables (ad_field_trl...) are queried even there is no translation installed in the instance.
This is unnecessary because all those queries will return no record and can be known in advance. |
Steps To Reproduce | -Set pg to log all queries
-In an instance with no translation installed
-Open BP window
-Check there are 200 queries to ad_field_trl, 120 to ad_ref_list_value_trl |
Proposed Solution | org.openbravo.client.application.window.OBViewUtil.getLabel method should look for translations only in case there is at least one installed: OBContext.hasTranslationInstalled() |
Additional Information | |
Tags | Performance |
Relationships | duplicate of | design defect | 0039670 | | closed | alostale | view generation scalability issues | related to | defect | 0029910 | | closed | platform | exporting grid to csv can fail if audit fields are included | related to | defect | 0028478 | | closed | NaroaIriarte | view generation: unneeded queries to grid config tables | related to | defect | 0028479 | | closed | alostale | unneeded queries to ad_langue table | related to | defect | 0025387 | 3.0MP31 | closed | alostale | unneeded flushes in view generation |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2014-12-23 15:51 | alostale | New Issue | |
2014-12-23 15:51 | alostale | Assigned To | => AugustoMauch |
2014-12-23 15:51 | alostale | Modules | => Core |
2014-12-23 15:51 | alostale | Triggers an Emergency Pack | => No |
2014-12-23 15:52 | alostale | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=7331#r7331 |
2014-12-23 15:53 | alostale | Tag Attached: Performance | |
2014-12-23 15:59 | alostale | Relationship added | related to 0028478 |
2014-12-23 16:10 | alostale | Relationship added | related to 0028479 |
2015-01-07 16:06 | shuehner | Issue Monitored: shuehner | |
2015-03-06 14:45 | alostale | Priority | normal => urgent |
2015-03-06 14:45 | alostale | Status | new => scheduled |
2015-03-06 14:46 | alostale | Status | scheduled => acknowledged |
2015-03-11 08:10 | alostale | Target Version | 3.0PR15Q2 => |
2015-03-17 14:37 | alostale | Assigned To | AugustoMauch => platform |
2015-11-11 11:37 | alostale | Priority | urgent => normal |
2015-11-11 12:42 | alostale | Priority | normal => high |
2015-11-12 18:13 | alostale | Relationship added | related to 0029910 |
2015-11-13 08:30 | alostale | Status | acknowledged => scheduled |
2015-11-13 08:30 | alostale | Assigned To | platform => alostale |
2015-11-13 08:35 | alostale | Relationship added | related to 0025387 |
2015-11-13 09:03 | hgbot | Checkin | |
2015-11-13 09:03 | hgbot | Note Added: 0081801 | |
2015-11-13 09:03 | hgbot | Status | scheduled => resolved |
2015-11-13 09:03 | hgbot | Resolution | open => fixed |
2015-11-13 09:03 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/fdb8a4e6f1858aa6c1379d90e73887447d20d834 [^] |
2015-11-13 09:04 | alostale | Review Assigned To | => caristu |
2015-11-13 09:17 | alostale | Note Added: 0081803 | |
2015-11-13 09:18 | alostale | Note Edited: 0081803 | bug_revision_view_page.php?bugnote_id=0081803#r10194 |
2015-11-13 10:06 | hgbot | Checkin | |
2015-11-13 10:06 | hgbot | Note Added: 0081805 | |
2015-11-23 21:17 | hudsonbot | Checkin | |
2015-11-23 21:17 | hudsonbot | Note Added: 0082223 | |
2015-11-23 21:17 | hudsonbot | Checkin | |
2015-11-23 21:17 | hudsonbot | Note Added: 0082224 | |
2015-11-27 10:33 | caristu | Note Added: 0082402 | |
2015-11-27 10:33 | caristu | Status | resolved => closed |
2015-11-27 10:33 | caristu | Fixed in Version | => 3.0PR16Q1 |
2018-11-22 09:25 | alostale | Relationship added | duplicate of 0039670 |
Notes |
|
(0081801)
|
hgbot
|
2015-11-13 09:03
|
|
Repository: erp/devel/pi
Changeset: fdb8a4e6f1858aa6c1379d90e73887447d20d834
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Nov 13 09:02:58 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/fdb8a4e6f1858aa6c1379d90e73887447d20d834 [^]
fixed bug 28477: view generation: unneeded queries to trl tables
When generating view definition for standard windows queries to translation
tables where performed regardless the instance had no translation installed.
This results in several queries that were useless as they should never return
any value.
These queries have been prevented by checking if translations are installed
before executing them.
---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/ViewComponent.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewParameterHandler.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewUtil.java
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceProperty.java
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorComponent.java
---
|
|
|
(0081803)
|
alostale
|
2015-11-13 09:17
(edited on: 2015-11-13 09:18) |
|
Tested:
* Compared generated json before and after the fix: both are identical in instances with and without translations installed.
* Translations still work as they did before.
* Having translations installed there is no performance regression after the fix
Improvements:
* All trl queries have been prevented if not translation is installed
* Reductions depend on the view being generated. For the tested windows, the average reduction is 11% in total number of queries and 25% faster
* More details on timing and number of queries can be found here [1]
[1] https://docs.google.com/spreadsheets/d/1OONLHyvxnq0-Y11uOSx1gEPyJzmgqOhDuogl1c08U9U/edit?usp=sharing [^]
|
|
|
(0081805)
|
hgbot
|
2015-11-13 10:06
|
|
Repository: erp/devel/pi
Changeset: 9191d32f8b30fc560d9bdc123eb9d24cd6c3d2af
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Nov 13 10:05:37 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/9191d32f8b30fc560d9bdc123eb9d24cd6c3d2af [^]
related to bug 28477: removed debugging code
---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewUtil.java
---
|
|
|
|
|
|
|
|
|
|
Code review + tested OK:
- Unneeded queries are not executed (with no translation installed)
- Translations continue working fine |
|