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.
Review at http://gwt-code-reviews.appspot.com/1341802
Review by: scottb@google.com
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@9668 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/js/JsInliner.java b/dev/core/src/com/google/gwt/dev/js/JsInliner.java
index 55ab2fc..5b56c97 100644
--- a/dev/core/src/com/google/gwt/dev/js/JsInliner.java
+++ b/dev/core/src/com/google/gwt/dev/js/JsInliner.java
@@ -1618,7 +1618,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.