BT

Jack & Jill: New Android Compilers for More Performance

| by Abel Avram Follow 12 Followers on Dec 04, 2014. Estimated reading time: 1 minute |

Eric Lafortune, Technical Director of Saikoa, maker of DexGuard, has discovered new tools in the SDK for Android 5.0 Revision 1 (API 21.1), namely two compilers called Jack and Jill. These tools are meant to streamline the compilation process for Android.

Google introduced the Android RunTime (ART) as an experimental utility in KitKat, and made it the default runtime for Lollipop, replacing Dalvik. ART takes DEX bytecode and converts it to native code when applications are installed on the device, doing ahead-of-time compilation but considering the device’s characteristics. Now, Google seems to be enhancing the compilation process even further.

According to Lafortune, Jack is a tool based on the Eclipse Java compiler and ProGuard. ProGuard is an optimization tool that shrinks a codebase by removing unused code and obfuscates it by renaming classes, methods and fields. Even though ProGuard has been integrated into the Android build system, being recommended when generating release binaries, developers have the choice to use it or not. If Jack becomes official, they will have to use it but they will still have some control over it through the configuration files.

Jill, the other new tool, is used to convert Java library bytecode into an intermediary bytecode called Jayce. Jack compiles both Java source code and Jayce binary code, generating optimized DEX bytecode. The compilers “seem quite functional,” although Jack doesn't support “some of the advanced features of ProGuard (yet), for instance to remove logging code,” wrote Lafortune.

The compilers do not support Java 8 yet, but they strive for “backward compatibility and open up possibilities for future extension,” added Lafortune. Developers can try them out in a Gradle build using the Android plugin 1.0.0 RC.

Jack and Jill produce even more optimized code, smaller in size and possibly obfuscated, being another attempt from Google to increase the performance of their mobile operating system.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss
BT