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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0036559
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2017-08-01 09:022017-09-18 18:23
ReporteraferrazView Statuspublic 
Assigned Toalostale 
PrioritynormalResolutionfixedFixed in Version3.0PR17Q4
StatusclosedFix in branchFixed in SCM revisionb12d3da979df
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0036559: Old callouts should be refactored to implement SimpleCallout

DescriptionCallouts that do not extend SimpleCallout are defined as Servlets (as this is how 2.50 technology worked), they executed as follows:

1. A fake request is created to invoke them as a Servlet
2. That request is used to write the response in as a String representing JavaSript code
3. That string is evaluated, parsed and executed as JavaScript in server
4. To finally set the values it requires

In addition to all the overhead involved in each of the steps described above, step 3 generates bytecodes from JavaScript that are stored in PermGen memory space. This causes excessive PermGen consumption as well as it trigger Major GC Collections even with a low heap use.

All these steps are avoided for SimpleCallout since PR16Q4 0032366
Steps To ReproduceTo emulate it:

1. Apply attached diff that executes step 3 defined in description 2K times per callout
2. Limit PermGen (ie. 160MB) and monitor JVM
3. Open Sales Order window and click on new (this executes SL_Order_DocType and SL_Order_PriceList callouts)
  -> Check JVM graphs during execution (see attached image):
      * PermGen rapidly increases
      * This is caused to a big number of classes loaded
      * Finally, major GC collection cycles are triggered

To detect wrong callouts, apply detect-callouts.diff and execute ClassLoaderTest.

This is the list of 10 Platform callouts obtained in current pi:
- SL_IsDefault
- SL_Column
- SL_AlertRule_SQL
- FixedValueExpressionCallout
- Activation_Message
- SL_ModuleCallout
- SL_Module_Minor_Version
- SL_TableAudit
- DefaultExpressionCallout
- SelectorFieldPropertyCallout
TagsNo tags attached.
Attached Filesdiff file icon 36559.diff [^] (47,853 bytes) 2017-08-01 10:00 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0036882 closedcaristu There exists some old callouts in core still not refactored to SimpleCallout 
depends on defect 0036599 closedalostale API change: platform callouts now implement SimpleCallout 
related to design defect 0036067 closedmarkmm82 old callouts should be refactored to implement SimpleCallout 

-  Notes
(0098384)
hgbot (developer)
2017-08-04 09:44

Repository: erp/devel/pi
Changeset: b12d3da979dfb34ae678e7033cb0c4af8ec93398
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Aug 01 13:42:56 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b12d3da979dfb34ae678e7033cb0c4af8ec93398 [^]

fixed 36559: platform callouts should be refactored to implement SimpleCallout

---
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorFieldPropertyCallout.java
M src/org/openbravo/erpCommon/ad_callouts/Activation_Message.java
M src/org/openbravo/erpCommon/ad_callouts/SL_AlertRule_SQL.java
M src/org/openbravo/erpCommon/ad_callouts/SL_Column.java
M src/org/openbravo/erpCommon/ad_callouts/SL_IsDefault.java
M src/org/openbravo/erpCommon/ad_callouts/SL_ModuleCallout.java
M src/org/openbravo/erpCommon/ad_callouts/SL_Module_Minor_Version.java
M src/org/openbravo/erpCommon/ad_callouts/SL_TableAudit.java
---
(0098386)
alostale (developer)
2017-08-04 09:47

Reviewed proposed patch, applied with some modifications and tested

- Issue History
Date Modified Username Field Change
2017-08-01 09:02 aferraz New Issue
2017-08-01 09:02 aferraz Assigned To => platform
2017-08-01 09:02 aferraz Modules => Core
2017-08-01 09:02 aferraz Triggers an Emergency Pack => No
2017-08-01 09:03 aferraz Relationship added related to 0036067
2017-08-01 10:00 aferraz File Added: 36559.diff
2017-08-04 09:41 alostale Relationship added depends on 0036599
2017-08-04 09:44 hgbot Checkin
2017-08-04 09:44 hgbot Note Added: 0098384
2017-08-04 09:44 hgbot Status new => resolved
2017-08-04 09:44 hgbot Resolution open => fixed
2017-08-04 09:44 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b12d3da979dfb34ae678e7033cb0c4af8ec93398 [^]
2017-08-04 09:46 alostale Assigned To platform => alostale
2017-08-04 09:47 alostale Review Assigned To => alostale
2017-08-04 09:47 alostale Note Added: 0098386
2017-08-04 09:47 alostale Status resolved => closed
2017-08-04 09:47 alostale Fixed in Version => 3.0PR17Q4
2017-09-18 18:23 caristu Relationship added related to 0036882


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker