ART (Android Runtime)

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 successor 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 in ART

  1. AOT (Ahead of Time compilation): 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.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s