Register

Switching runtime from Dalvik to ART

This is a discussion on Switching runtime from Dalvik to ART within the Droid Razr M Development forums, part of the Droid Razr M category; About two weeks ago the KitKat OTA was pushed on my Razr M. In a separate post I will share my impressions, however, being the ...

Results 1 to 9 of 9
Like Tree1Likes
  • 1 Post By Batman

Thread: Switching runtime from Dalvik to ART

  1. #1
    Senior Member
    Join Date
    Aug 2012
    Location
    Somewhere around Boston
    Posts
    358
    Member #
    8245
    Liked
    74 times

    Switching runtime from Dalvik to ART

    About two weeks ago the KitKat OTA was pushed on my Razr M. In a separate post I will share my impressions, however, being the tinkerer that I am, one of the first things I did was to enable the now hidden Developer Options in "Settings". As a simple google search would quickly reveal, it is just a matter of tapping repeatedly (seven times, I think) "Build Number" under "Settings -> About Phone" to make the "Developer Options" menu appear in "Settings".

    Done that, I was intrigued by a new item, "Select Runtime". Back to a google search, it did not take long to find out what this is all about. As many of the more technically savvy no doubt know already, Google is about to abandon the Dalvik Virtual Machine in favor of the new ART. "Use Dalvik" and "Use ART" are in fact the two options under "Select Runtime". ART will be the default and only runtime in the upcoming new versions of Android. In KitKat Google introduced ART as an option to get the developers and the more adventurous among us take it out for a spin.

    Needless to say, I HAD to try it Once the option "Use ART" is selected, it will ask for confirmation and then the phone reboots. After the usual Droid lightnings animation the phone will tell you that Android is upgrading, it is actually just optimizing the apps to run with ART rather than Dalvik. What is doing is in effect compiling the apps "Ahead Of Time" or AOT for short, as opposed to what Dalvik does, which is a "Just In Time" (or JIT) compilation every time the app is launched (over-simplification, I know, I hope the programmers out there are not too horrified...). Depending on how many apps you have, it can take anything from 10 to 30 minutes to complete the process. In my case, with 352 apps it took about 20 minutes.

    Once done optimizing the phone finishes rebooting and you are good to go. Why bother, you say? On paper, going to ART should do mainly two things:

    1. Speed up launch of apps, since they are all pre-compiled, no more JIT every time
    2. Improve battery life, as less horsepower is required to launch the app (again, no JIT needed every time)

    On the other hand, each app requires more storage space, as it is permanently compiled. In my case, with exactly the same number of apps, I had to give up about 800Mb of storage. My available internal memory went from 2.2Gb to 1.4Gb. Just for the sake of experimenting, I went back to Dalvik using the same procedure and the storage went back to exactly what it was. I will continue experimenting, however my first impression is that the gain in speed is not earth-shattering. I do not have very large or CPU intensive apps, though, it might be different for other users.

    As this operation is easy and, for what I have experienced and also learned researching this topic, totally harmless to the phone and apps, it might be worth giving it a try. Just make sure your phone has plenty of charge (I'd say at least 50%) or you keep it plugged. During the optimization it seemed like the processor was going full blast, the phone got quite warm and the screen looked as it defaulted to max brightness, although it was mostly black, with a small status window in the middle.

    Happy tinkering and if you want to learn more just google "switching from Dalvik to ART" and you will get plenty to read! As always, do this at your own risk, this option is under "Developer Options" for a reason
    GoCliffGo05 likes this.
    Droid Turbo
    32Gb, Metallic Black
    Cimo Wave Slim TPU Soft Case Black


    Razr M Rooted
    16Gb PNY Class 10 Micro SDHC
    Fosmon DURA S Series TPU Case Black
    Miztech MZ 521 PDA Leather Holster



    Life is too short to own a boring phone...

  2. #2
    Super Moderator
    Join Date
    Oct 2012
    Location
    Maryland
    Posts
    1,486
    Member #
    8956
    Liked
    325 times
    Art is pretty cool. Mostly stayed away from it because not all apps are compatible... A lot more are now then when it was first released but I still run into a few.

  3. #3
    Super Moderator
    Join Date
    Dec 2011
    Location
    Sanger, TX
    Posts
    3,605
    Member #
    444
    Liked
    338 times
    Interesting, but I don't see the setting in my Developer Settings for my LG G2. LG must not have put it in yet, or it's somewhere else...

  4. #4
    Super Moderator
    Join Date
    Oct 2012
    Location
    Maryland
    Posts
    1,486
    Member #
    8956
    Liked
    325 times
    What Android version are you on?

  5. #5
    Super Moderator
    Join Date
    Dec 2011
    Location
    Sanger, TX
    Posts
    3,605
    Member #
    444
    Liked
    338 times
    4.4.2

  6. #6
    Super Moderator
    Join Date
    Oct 2012
    Location
    Maryland
    Posts
    1,486
    Member #
    8956
    Liked
    325 times
    Bummer, yea may be an LG thing. This early in the development, you aren't missing a ton though.

  7. #7
    Super Moderator
    Join Date
    Dec 2011
    Location
    Sanger, TX
    Posts
    3,605
    Member #
    444
    Liked
    338 times
    The G3's supposed to have ART enabled by default. At least that's what they are saying overseas. Some are having problems with apps because of it. Guess I'll find out next Thursday if I'll have any problems with ART.

  8. #8
    Senior Member
    Join Date
    Aug 2012
    Location
    Somewhere around Boston
    Posts
    358
    Member #
    8245
    Liked
    74 times
    My M was upgraded to 4.4.2 too, I guess having the option to pick Dalvik or ART could be a result of Google owning Motorola Mobility. ART is supposed to be the only runtime starting with the next Android release, so it would makes sense that the newest phones would not have an option just because there is only ART.

    Still a bit surprised about the big difference in storage usage. Considering the trend to have more and more phones with no uSD, while on the other hand computing power has been going through the roof (Quad-Cores, fake Opto-Cores, etc. ) I am not so sure I want to trade storage for a slightly quicker starting app.

    This has probably to do more with the annoyance (and law suite) from Oracle about Java patent infringements than with actual performance improvement...
    Droid Turbo
    32Gb, Metallic Black
    Cimo Wave Slim TPU Soft Case Black


    Razr M Rooted
    16Gb PNY Class 10 Micro SDHC
    Fosmon DURA S Series TPU Case Black
    Miztech MZ 521 PDA Leather Holster



    Life is too short to own a boring phone...

  9. #9
    Super Moderator
    Join Date
    Dec 2011
    Location
    Sanger, TX
    Posts
    3,605
    Member #
    444
    Liked
    338 times
    So, ART was not enabled by default. I went ahead and switched it over to ART and guess what? It's no beuno on the G3, or at elast the VZW version of the G3. Wow was my brand new phone a POS. After an FDr I left Dalvik and so far the phone's working as I had hoped.

    Just say no to ART!

 

 

Remove Ads

Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Similar Threads

  1. 4G auto switching to 3G in solid 4G area???
    By Robert in forum Droid RAZR Help
    Replies: 20
    Last Post: 09-01-2013, 11:29 PM
  2. Phone Switching
    By C.Warren in forum Droid RAZR General Discussions
    Replies: 9
    Last Post: 04-24-2012, 07:08 AM
  3. Strange thing in switching sim card
    By razr totin Jim in forum Droid RAZR General Discussions
    Replies: 7
    Last Post: 03-04-2012, 12:09 PM
  4. Switching out SD cards
    By sierra in forum Droid RAZR General Discussions
    Replies: 3
    Last Post: 03-03-2012, 04:52 PM

Search tags for this page

art runtime droid razr m
,
art runtime vs dalvik razr m xt905
,
art vs dalvik razr hd
,
art vs dalvik razr m
,
best runtime droid razr hd
,
how to switch to dalvik droid turbo maxx
,

motorola razr m runtime art

,
razr m art or dalvik
,

remove battery while switching to art runtime

,

why did google abandon dalvik

Click on a term to search for related topics.