Optimization
DashO's Optimization speeds up your code and reduces resulting binary size, by performing algebraic identity, strength reduction, and other peephole optimizations. You can enable or disable Optimization on the Optimization - Options page, and can include or exclude classes and members from Optimization on the Optimization - Include and Exclude pages. You can also control how DashO decides whether or not to make classes, non-private methods, and non-private methods public.
Note:
DashO's Optimization features are not used in Android Mode, and related settings are ignored. When using Android Mode, you can configure R8 to perform similar optimizations.
Make Public
DashO can change the access modification of classes, non-private methods, and non-private fields to public before writing them to disk.
This solves the problem of classes that change package membership and use protected or default (package-private) access modifiers.
For example, if class com.example.pack.Foo
is not renamed because it is an entry point, and class com.example.pack.Bar
is renamed to com.example.a
, package-private members on both classes would need to be renamed to maintain the prior level of access.
This will not generally change the behavior of the processed classes; access restrictions are checked at compile time and should generally prevent illegal access.
Dynamic linking of public methods should be faster than that of more restricted access levels. Because public has no restrictions, there is no need for the runtime to verify equivalent package or class membership.
By default, DashO will make classes and members public when it appears to be necessary to preserve access between renamed classes. You can disable this behavior on the Optimization - Options page. You can also force DashO to make classes and members public when DashO would otherwise not do so.
Notes:
Disabling Make Public may cause access errors with protected or default (package-private) access modifiers on classes, methods, or fields. That is, a class that was in a given package may now be in a new renamed package. However, it may still attempt to access non-public classes, methods, or fields from the original package causing an access exception.
DashO's default behavior generally avoids this problem and has been shown to be safe for most applications.