Reviewers: scottb,
Description:
Adds option to override JsInliner's max complexity ratio heuristic with
JVM property 'gwt.jsinlinerratio'. The default is 5.0, smaller values
tend to reduce code size. Empirically, 1.2 seems to be a good value.
Please review this at http://gwt-code-reviews.appspot.com/1341802/show
Affected files:
M dev/core/src/com/google/gwt/dev/js/JsInliner.java
Index: dev/core/src/com/google/gwt/dev/js/JsInliner.java
===================================================================
--- dev/core/src/com/google/gwt/dev/js/JsInliner.java (revision 9661)
+++ dev/core/src/com/google/gwt/dev/js/JsInliner.java (working copy)
@@ -1621,7 +1621,8 @@
* the generated output. Increasing this number will allow larger
sections of
* code to be inlined, but at a cost of larger JS output.
*/
- private static final int MAX_COMPLEXITY_INCREASE = 5;
+ private static final double MAX_COMPLEXITY_INCREASE =
+ Double.parseDouble(System.getProperty("gwt.jsinlinerratio", "5.0"));
/**
* Static entry point used by JavaToJavaScriptCompiler.
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors