ART (Android Runtime)

Foram Adeshara
Jul 20, 2017 · 1 min read

We all are well know by the term “Dalvik” and its usage. Dalvik is a virtual machine (VM) for Android operating system. Java program which are compiled by Java compiler in bytecode and store in .class file which are given to dx tool for translating it into Dalvik bytecode which are store in .dex file. This dex file is then given to Android Assets Packaging Tool (aapt) which handles the packing process and .apk file is generated.

ART is replacement of Dalvik. Android applications are compiled to Dalvik bytecode and run with ART. ART are used in the devices running on Android 5.0 and later.

Features of ART

  1. AOT (Ahead of Time compilation): It compiles entire applications into native machine code upon their installation. This improves the performance of the app
  2. Improve Garbage collection: Improvement occurs by making concurrent garbage collections more timely.
  3. Gives more details on runtime exception: Instead of just showing java.lang.NullPointerException it shows the exception in much more detail like java.lang.NullPointerException: Attempt to write to field ‘int android.accessibilityservice.AccessibilityServiceInfo.flags’ on a null object reference
  4. Use Sampling Profile: Before developers used a tool called Traceview to track the app execution this used to slow down the performance considerably. Now ART uses Sampling profile without risking the performance of the app.

)
Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade