The Java output is somewhat optimized, unused instances for various drawing classes are removed, useless Canvas.save() and Canvas.restore() calls are eliminated.
However, there is still room for improvement, for example too many Matrix class instances are created which are not too useful at the end (usually merged with other Matrix instances using Matrix.preConcat() calls).
Further optimization methods are needed for the output.