-dontoptimizeoption. For more fine-grained control over individual optimizations, experts can use the
-optimizationsoption, with a filter based on the optimization names listed below. The filter works like any filter in ProGuard.
The following wildcards are supported:
||matches any single character in an optimization name.|
||matches any part of an optimization name.|
only performs the two specified peephole optimizations.
For example, "
!method/propagation/*" performs all optimizations,
except the ones that propagate values between methods.
performs all peephole optimizations.
Some optimizations necessarily imply other optimizations. These are then indicated. Note that the list is likely to change over time, as optimizations are added and reorganized.
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
maximum.inlined.code.length(default = 8 bytes)
maximum.resulting.code.length(default = 8000 bytes for JSE, 2000 bytes for JME)
optimize.conservatively(default = unset)
ClassCastException, without any other useful purposes. By default, ProGuard may just discard such seemingly useless instructions, resulting in better optimization of most common code.