The Android runtime (ART) is the managed runtime used by applications and some system services on Android. ART and its predecessor Dalvik were originally created specifically for the Android project. ART as a runtime runs the Dalvik Executable format and the Dex bytecode specification. ART and Dalvik are compatible runtimes that run Dex bytecode, so applications developed for Dalvik should work when run with ART. However, some of the techniques that worked on Dalvik did not work on ART. For information on the most important issues, see Verify app behavior in the Android runtime (ART).
ART Features
Here are some of the main features implemented by ART.
- Ahead-of-time (AOT) compilation
ART introduces advance-of-time (AOT) compilation, which can improve application performance. ART also has stricter install time verification than Dalvik. At the time of installation, ART collects the application using the dex2oat tool on the device. This utility accepts a DEX file as input and generates an executable compiled application for the target device. The utility should be able to compile all valid DEX files without any hassle. However, some post-processing tools generate invalid files which Dalvik can tolerate but ART cannot compile. For more information, see Solving Garbage Collection Problems.
- Better garbage collection
Garbage collection (GC) is very resource intensive, which can interfere with app performance, resulting in intermittent display, poor UI responsiveness, and other issues. ART improves waste collection in several ways:
- Most concurrent designs with one GC break
- Concurrent copying to reduce background memory usage and fragmentation
- GC pause length independent of Collector heap size with lower total GC time for the special case of cleanup of newly allocated and short lived objects
- Improves garbage collection ergonomics, makes simultaneous garbage collection more timely, which makes GC_FOR_ALLOC events very rare in typical use cases
Improved development and debugging
ART offers a number of features to enhance application development and debugging. Support for historical profiler sampling, developers have used the Traceview feature (designed to track application execution) as a profiler. While Traceview provides useful information, its results in Dalvik have been impacted by the per-method-call overhead, and use of the tool significantly affects runtime performance. ART adds support for custom sampling profilers that do not have this limitation. This provides a more accurate view of application execution without significant slowdown. Sampling support has been added to Traceview for Dalvik in the KitKat release. Support for more debugging features ART supports a number of new debugging options, especially in functionality related to monitor and garbage collection. For example, you can:
- See what locks are being held in the stack trace, then jump to the thread holding the locks.
- Ask how many live occurrences there are for a given class, ask to see examples, and see what references keep an object alive.
- Filter events (such as breakpoints) for specific instances.
- View the value returned by the method on exit (using the “method-exit” event).
- Set field observation points to suspend program execution when certain fields are accessed and/or modified.
The need for digital IT is needed in daily activities, Bead IT Consultant is the right choice as your partner, visit our website by clicking this link: www.beadgroup.com