Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0028477
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2014-12-23 15:512015-11-27 10:33
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PriorityhighResolutionfixedFixed in Version3.0PR16Q1
StatusclosedFix in branchFixed in SCM revisionfdb8a4e6f185
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0028477: view generation: unneeded queries to trl tables

DescriptionWhen 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 Solutionorg.openbravo.client.application.window.OBViewUtil.getLabel method should look for translations only in case there is at least one installed: OBContext.hasTranslationInstalled()
TagsPerformance
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
duplicate of design defect 0039670 closedalostale view generation scalability issues 
related to defect 0029910 closedplatform exporting grid to csv can fail if audit fields are included 
related to defect 0028478 closedNaroaIriarte view generation: unneeded queries to grid config tables 
related to defect 0028479 closedalostale unneeded queries to ad_langue table 
related to defect 00253873.0MP31 closedalostale unneeded flushes in view generation 

-  Notes
(0081801)
hgbot (developer)
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 (manager)
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 (developer)
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
---
(0082223)
hudsonbot (developer)
2015-11-23 21:17

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/7b56bebaaa88 [^]
Maturity status: Test
(0082224)
hudsonbot (developer)
2015-11-23 21:17

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/7b56bebaaa88 [^]
Maturity status: Test
(0082402)
caristu (developer)
2015-11-27 10:33

Code review + tested OK:

- Unneeded queries are not executed (with no translation installed)
- Translations continue working fine

- 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 View Revisions
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 View Revisions
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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker