diff options
Diffstat (limited to 'docs/manual/optimizations.html')
-rw-r--r-- | docs/manual/optimizations.html | 50 |
1 files changed, 45 insertions, 5 deletions
diff --git a/docs/manual/optimizations.html b/docs/manual/optimizations.html index 9c20571..e4c96b6 100644 --- a/docs/manual/optimizations.html +++ b/docs/manual/optimizations.html @@ -1,10 +1,21 @@ -<!doctype html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> +<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <meta http-equiv="content-style-type" content="text/css"> <link rel="stylesheet" type="text/css" href="style.css"> <title>Optimizations</title> +<script type="text/javascript" language="JavaScript"> +<!-- +if (window.self==window.top) + window.top.location.replace("../index.html#"+window.location.pathname+window.location.hash); +else { + var hash="#"+window.location.pathname.replace(window.top.location.pathname.replace("index.html", ""), ""); + if (window.top.location.hash!=hash) + window.top.location.hash=hash; +} +//--> +</script> </head> <body> @@ -124,6 +135,9 @@ are added and reorganized. <code><b>code/simplification/branch</b></code></dt> <dd>Performs peephole optimizations for branch instructions.</dd> +<dt><code><b>code/simplification/string</b></code></dt> +<dd>Performs peephole optimizations for constant strings.</dd> + <dt><div>(<i>best used with</i> <code>code/removal/advanced</code>)</div> <code><b>code/simplification/advanced</b></code></dt> <dd>Simplifies code based on control flow analysis and data flow @@ -142,17 +156,43 @@ are added and reorganized. <dd>Removes unused variables from the local variable frame.</dd> <dt><code><b>code/removal/exception</b></code></dt> -<dd>Removes exceptions with empty catch blocks.</dd> +<dd>Removes exceptions with empty try blocks.</dd> <dt><code><b>code/allocation/variable</b></code></dt> <dd>Optimizes variable allocation on the local variable frame.</dd> </dl> <p> -<hr> +ProGuard also provides some unofficial settings to control optimizations, that +may disappear in future versions. These are Java system properties, which +can be set as JVM arguments (with <code>-D.....)</code>: +<dl> +<dt><code><b>maximum.inlined.code.length</b></code> (default = 8 bytes)</dt> +<dd>Specifies the maximum code length (expressed in bytes) of short methods + that are eligible to be inlined. Inlining methods that are too long may + unnecessarily inflate the code size.</dd> + +<dt><code><b>maximum.resulting.code.length</b></code> (default = 8000 bytes + for JSE, 2000 bytes for JME)</dt> +<dd>Specifies the maximum resulting code length (expressed in bytes) allowed + when inlining methods. Many Java virtual machines do not apply just-in-time + compilation to methods that are too long, so it's important not to let them + grow too large.</dd> + +<dt><code><b>optimize.conservatively</b></code> (default = unset)</dt> +<dd>Allows input code with ordinary instructions intentionally throwing + <code>NullPointerException</code>, + <code>ArrayIndexOutOfBoundsException</code>, or + <code>ClassCastException</code>, without any other useful purposes. By + default, ProGuard may just discard such seemingly useless instructions, + resulting in better optimization of most common code.</dd> +</dl> + +<hr /> +<noscript><div><a target="_top" href="../index.html" class="button">Show menu</a></div></noscript> <address> -Copyright © 2002-2009 -<a href="http://www.graphics.cornell.edu/~eric/">Eric Lafortune</a>. +Copyright © 2002-2013 +<a target="other" href="http://www.lafortune.eu/">Eric Lafortune</a>. </address> </body> </html> |