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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0036172
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2017-06-02 14:292017-09-21 16:49
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PriorityurgentResolutionfixedFixed in Version3.0PR17Q4
StatusclosedFix in branchFixed in SCM revision3ec690db55fe
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

0036172: WindowSettingsActionHandler underperformance

DescriptionWindowSettingsActionHandler which is executed whenever a window is opened, has several performance problems from the code point of view:

* Retrieving window from DB + DAL: using ADCS would prevent it
* Querying one by one WindowAccessData.hasReadOnlyAccess all the tabs in the window, could be implemented in a single query
* Getting preferences once and again
* Review also PersonalizationHandler
* For the window all ad_window_access rows are loaded in memory to iterate them and select only the current one. This is specially problematic having many roles.
* When there are ad_tab_access, all fields in the tab are included in the response, but it should be possible, if properly handled in client, to include only the ones with a different setting than the tab access
* ...
Steps To Reproduce1.1. Check it in actual customers

or

2.1 Execute attached scripts (for different cases):
   -case 0: clean sample data
   -case 1: ad_tab_access to current role for all tabs in product
   -case 2: case 1 + ad_field_access to current role for all fields in product
   -case 3: 10K roles with access to product window
2.2 Execute attached jmeter: which performs 200 synchronous requests to WSAH for Product window (as it has many tabs)
Proposed SolutionFinally, not all fix candidates have been implemented as some of them were more risky and with current fix we've managed to get stable response times <40ms (for cases where originally were >400ms) regardless configuration settings [1].

Also a much better heap consumption has been achieved.

---

[1] https://docs.google.com/spreadsheets/d/1p-KK0gEHj2QjIgKP6tpuPzJ3QW-5M3c9P6hwKVwu0GM/edit#gid=1009287793 [^]
TagsPerformance
Attached Files? file icon WSAH-plan-config.sql [^] (4,851 bytes) 2017-07-27 12:12
? file icon wsah.jmx [^] (11,849 bytes) 2017-07-27 12:13

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0035260 closedalostale unneeded flushes in window settings action handler 
related to defect 0036066 closedalostale no updateable AD definition can be overwritten by role config 
depends on feature request 00349753.0PR17Q2 closedalostale change scope of ADCS to ApplicationScoped 

-  Notes
(0098266)
hgbot (developer)
2017-07-31 09:11

Repository: erp/devel/pi
Changeset: 3ec690db55fe0b4bae71617d1775ffe165e63bd6
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Jul 31 09:00:49 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3ec690db55fe0b4bae71617d1775ffe165e63bd6 [^]

fixed bug 36172: WindowSettingsActionHandler underperformance

  Several changes in WindowSettingsActionHandler performance which improve both
  processing time and heap memory consumption:
    - Use ADCS to query window/tab definition in order to prevent DB queries
    - Optimized DAL queries so that only relevant records are queries from DB and
      loaded in memory

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/WindowSettingsActionHandler.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/ApplicationDictionaryCachedStructures.java
---
(0098393)
caristu (developer)
2017-08-04 13:20

Code reviewed + tested OK.
(0099287)
hudsonbot (developer)
2017-09-21 16:49

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/9750b78d3e5c [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2017-06-02 14:29 alostale New Issue
2017-06-02 14:29 alostale Assigned To => platform
2017-06-02 14:29 alostale Modules => Core
2017-06-02 14:29 alostale Triggers an Emergency Pack => No
2017-06-02 14:29 alostale Tag Attached: Performance
2017-06-02 14:29 alostale Relationship added related to 0035260
2017-06-02 14:30 alostale Relationship added related to 0036066
2017-06-02 14:31 alostale Status new => acknowledged
2017-07-26 13:53 alostale File Added: windowSettingsAH.sql
2017-07-27 12:12 alostale File Deleted: windowSettingsAH.sql
2017-07-27 12:12 alostale File Added: WSAH-plan-config.sql
2017-07-27 12:13 alostale Assigned To platform => alostale
2017-07-27 12:13 alostale File Added: wsah.jmx
2017-07-27 12:16 alostale Relationship added depends on 0034975
2017-07-27 12:23 alostale Review Assigned To => caristu
2017-07-27 12:23 alostale Steps to Reproduce Updated View Revisions
2017-07-27 12:23 alostale Proposed Solution updated
2017-07-27 12:24 alostale Proposed Solution updated
2017-07-31 09:11 hgbot Checkin
2017-07-31 09:11 hgbot Note Added: 0098266
2017-07-31 09:11 hgbot Status acknowledged => resolved
2017-07-31 09:11 hgbot Resolution open => fixed
2017-07-31 09:11 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/3ec690db55fe0b4bae71617d1775ffe165e63bd6 [^]
2017-08-04 13:20 caristu Note Added: 0098393
2017-08-04 13:20 caristu Status resolved => closed
2017-08-04 13:20 caristu Fixed in Version => 3.0PR17Q4
2017-09-21 16:49 hudsonbot Checkin
2017-09-21 16:49 hudsonbot Note Added: 0099287


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker