• Android:What is ART?


    背景:Android4.2之前,安卓手机系统的应用程序均在Dalvik Java的虚拟机上执行,这样的执行模式还要依靠一个编译器来实现与应用程序的沟通。应用程序每次执行时,都须要将程序内的代码转变为机器码才干执行,这无形中多附加了一道手续,这就造成了手机耗电相对较快。占用内存大,用久了会卡顿的现象。

    前言:KitKat(奇巧巧克力):雀巢的巧克力棒产品,近期Google宣布最新4.4版Android将命名为"KitKat"

    One of the greatest features of Android 4.4.x KitKat, also probably the most under-reported one, is the next generation Android RunTime (ART).

    翻译:Android4.4.x KitKat 最显著的特征之中的一个就是下一代的Android Run Time(ART),也许也是下一个即将被广为关注的特征

    What is ART?

    翻译:什么是ART? (艺术)

    When you start any apps on your Android device, the system actually takes some time and effort to compile the app package to machine code so your device can understand and execute. It does this Just in Time of execution. So as you run apps on your device, it actually keeps doing these resource intensive tasks in the background and this is a major reason why people notice Android apps are a bit sluggish when compared to their iOS counterparts.

    翻译:当你在你的Android设备上启动随意app程序,系统都会耗费一些时间和精力(资源)去把该app包文件编译成机器码,以便你的设备能够理解并执行。这个过程在程序执行时执行。所以当你在你的设备上执行你的app程序,其实,在后台也同一时候执行着这些非常耗费资源的任务。这也是和苹果IOS系统相比,在Android系统上执行app程序会让人感觉的有些缓慢的主要原因。
    This is, until you switch to the new Android RunTime (ART).

    翻译:这个问题会一直存在,除非你换到新的Android Run Time。

    With ART enabled, machine code compilations are done Ahead of Time during app installation. So when you run apps on your device, it can skip all that and simply executes the code directly.
    翻译:在ART启用的情况下,机器码的编译会在app程序安装过程中提前编译完毕。这样当你在你的设备上执行你的app程序,它能够跳过编译的过程,直接执行编译好的机器码。


    The result? Reports show that ART yields performance improvements of around 10% to 20% on average. On the other hand it also boosts battery life because your device now does a lot less resource intensive machine code compiling. Take into considerations ART is currently a preview technology in Android 4.4.x KitKat so it can only get better and better in upcoming Android releases.

    翻译:这样做的结果是什么呢?报告显示ART使得操作性能平均提高10%到20%。而还有一方面。这也延长了电池的使用时间。

    由于如今你的设备大大降低了运行编译机器码这一耗费资源的行为。

    考虑到ART眼下仅仅是运用在Android4.4.X KitKat版本号上。因此在未来公布的Android版本号中ART仅仅会越来越好。


    英文原文截取自: http://www.mobilehiddencamera.com/

    翻译时间:2014年6月23日


  • 相关阅读:
    git init 后关联github仓库是发生错误:
    node mysql模块写入中文字符时的乱码问题
    Error: ER_BAD_FIELD_ERROR: Unknown column 'xxx' in 'where clause'
    安装MariaDB
    yum命令无效
    文档管理系统介绍
    RichTextBox文字处理控件属性介绍
    Android调用相册拍照控件实现系统控件缩放切割图片
    苹果5S指纹扫描识别传感器Touch ID有利于iPhone的安全性
    在服务器端将XML转换成HTML
  • 原文地址:https://www.cnblogs.com/lcchuguo/p/4707723.html
Copyright © 2020-2023  润新知