Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028478Openbravo ERPA. Platformpublic2014-12-23 15:592015-12-11 11:07
alostale 
NaroaIriarte 
highminorhave not tried
closedfixed 
5
 
3.0PR16Q1 
alostale
Core
No
0028478: view generation: unneeded queries to grid config tables
When standard views are generated, grid configuration tables at system and tab levels are unnecessarily queried for each field.
-Set pg to log all queries
-Open BP window
-Check there are around 500 queries for Obuiapp_Gc_Tab and Obuiapp_Gc_System tables
Somehow cache this information per tab, so only one query is required
Performance
related to defect 0028477 closed alostale view generation: unneeded queries to trl tables 
related to feature request 0028284 closed AugustoMauch Grid Configuration for High Volume Windows 
related to defect 0031696 closed platform unneeded queries to OBUIAPP_GC_System when generating views 
related to feature request 0031468 closed NaroaIriarte It would be nice to prevent sorting and filtering some columns. 
related to defect 0034769 closed alostale Skip grid config related junit tests if any module shipping grid configuration is installed. 
related to design defect 0039670 closed alostale view generation scalability issues 
Issue History
2014-12-23 15:59alostaleNew Issue
2014-12-23 15:59alostaleAssigned To => AugustoMauch
2014-12-23 15:59alostaleModules => Core
2014-12-23 15:59alostaleTriggers an Emergency Pack => No
2014-12-23 15:59alostaleRelationship addedrelated to 0028477
2014-12-23 15:59alostaleTag Attached: Performance
2014-12-23 16:00alostaleRelationship addedrelated to 0028284
2014-12-23 16:01alostaleFixed in Version => 3.0PR15Q2
2014-12-23 16:10alostaleFixed in Version3.0PR15Q2 =>
2014-12-23 16:10alostaleTarget Version => 3.0PR15Q2
2015-01-07 16:06shuehnerIssue Monitored: shuehner
2015-03-06 14:45alostalePrioritynormal => urgent
2015-03-06 14:45alostaleStatusnew => scheduled
2015-03-06 14:46alostaleStatusscheduled => acknowledged
2015-03-11 08:10alostaleTarget Version3.0PR15Q2 =>
2015-03-17 14:37alostaleAssigned ToAugustoMauch => platform
2015-11-11 11:37alostalePriorityurgent => normal
2015-11-11 12:42alostalePrioritynormal => high
2015-11-13 12:03alostaleStatusacknowledged => scheduled
2015-11-13 12:03alostaleAssigned Toplatform => NaroaIriarte
2015-11-13 13:05NaroaIriarteRelationship addedrelated to 0031468
2015-11-24 10:16hgbotCheckin
2015-11-24 10:16hgbotNote Added: 0082280
2015-11-24 10:16hgbotStatusscheduled => resolved
2015-11-24 10:16hgbotResolutionopen => fixed
2015-11-24 10:16hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/c4a8a1149e5ef350bb5e7dc73fa61033c5cf2588 [^]
2015-11-24 10:16NaroaIriarteIssue Monitored: alostale
2015-11-24 10:19NaroaIriarteReview Assigned To => alostale
2015-11-24 10:38hgbotCheckin
2015-11-24 10:38hgbotNote Added: 0082281
2015-11-24 17:27hudsonbotCheckin
2015-11-24 17:27hudsonbotNote Added: 0082306
2015-11-24 17:27hudsonbotCheckin
2015-11-24 17:27hudsonbotNote Added: 0082307
2015-12-02 15:52hgbotCheckin
2015-12-02 15:52hgbotNote Added: 0082538
2015-12-04 15:58hudsonbotCheckin
2015-12-04 15:58hudsonbotNote Added: 0082574
2015-12-04 15:58hudsonbotCheckin
2015-12-04 15:58hudsonbotNote Added: 0082575
2015-12-11 10:54alostaleRelationship addedrelated to 0031696
2015-12-11 11:07alostaleNote Added: 0082678
2015-12-11 11:07alostaleStatusresolved => closed
2015-12-11 11:07alostaleFixed in Version => 3.0PR16Q1
2016-12-19 12:09alostaleRelationship addedrelated to 0034769
2018-11-22 09:15alostaleRelationship addedrelated to 0039670

Notes
(0082280)
hgbot   
2015-11-24 10:16   
Repository: erp/devel/pi
Changeset: c4a8a1149e5ef350bb5e7dc73fa61033c5cf2588
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Fri Nov 20 17:33:19 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/c4a8a1149e5ef350bb5e7dc73fa61033c5cf2588 [^]

Fixed issue 28478: There where unneeded queries to grid configuration tables.

When standard views were generated, there were unneded queries to the grid configuration tables at system and tab level for each field.
To fix this the OBViewUtil.java has been modified and now the queries have been reduced.
A new inner class has been created, GridConfigSettings, this class has the shouldContinueProcessing() method which checks if any property is set to null yet in the grid configuration.
Firstly, the grid configuration at field level is checked, if any property is null yet, the grid configuration at field level is checked
an if there is any value null yet, the grid configuration at system level is checked. In this way the properties are filled.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewUtil.java
---
(0082281)
hgbot   
2015-11-24 10:38   
Repository: erp/devel/pi
Changeset: 31ed65965815392710bffc94e64ddd01b9b0203a
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Tue Nov 24 10:37:51 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/31ed65965815392710bffc94e64ddd01b9b0203a [^]

Related with issue 28478: Some JUnit test have been created.

Some tests which check some expressions in the view generated with the different levels of grid configuration
have been performed.

---
M src-test/src/org/openbravo/test/AllTests.java
A src-test/src/org/openbravo/test/views/ViewGenerationWithDifferentConfigLevelTest.java
---
(0082306)
hudsonbot   
2015-11-24 17:27   
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/c776efc2a085 [^]
Maturity status: Test
(0082307)
hudsonbot   
2015-11-24 17:27   
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/c776efc2a085 [^]
Maturity status: Test
(0082538)
hgbot   
2015-12-02 15:52   
Repository: erp/devel/pi
Changeset: b178a44101272fe343db7148b63700bad8b662f3
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Wed Dec 02 13:02:40 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/b178a44101272fe343db7148b63700bad8b662f3 [^]

Related with issue 28478: The tests have been improved.

The tests for the issue 28478 have been improved and test class is now in the proper testsuite.

---
M src-test/src/org/openbravo/test/AllAntTaskTests.java
M src-test/src/org/openbravo/test/AllTests.java
M src-test/src/org/openbravo/test/views/ViewGenerationWithDifferentConfigLevelTest.java
---
(0082574)
hudsonbot   
2015-12-04 15:58   
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/e875b083dc70 [^]
Maturity status: Test
(0082575)
hudsonbot   
2015-12-04 15:58   
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/e875b083dc70 [^]
Maturity status: Test
(0082678)
alostale   
2015-12-11 11:07   
code reviewed

tested:
 * Grid configuration are still applied as they were before

Improvements:
 * Queries to OBUIAPP_GC_Tab are reduced to 1 per tab
 * Additionally, queries OBUIAPP_GC_Field are also highly reduced:
   - In case no config for that tab is defined, no query at all is executed
   - If defined, a single query per tab is done

note it is still pending to optimize queries to OBUIAPP_GC_System as per reported in 0031696