Revision: 9668
Author: cromwell...@google.com
Date: Wed Feb  2 13:53:09 2011
Log: 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: sco...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=9668

Modified:
 /trunk/dev/core/src/com/google/gwt/dev/js/JsInliner.java

=======================================
--- /trunk/dev/core/src/com/google/gwt/dev/js/JsInliner.java Wed Feb 2 13:13:58 2011 +++ /trunk/dev/core/src/com/google/gwt/dev/js/JsInliner.java Wed Feb 2 13:53:09 2011
@@ -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.

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to