5,593,401 Members 36,317 Now Online
XDA Developers Android and Mobile Development Forum

Battery life on 4.4.2 with ART

Tip us?
 
mtotho
Old
#41  
Senior Member
Thanks Meter 104
Posts: 354
Join Date: Oct 2010
Location: Lambertville, NJ or Burlington, VT
Quote:
Originally Posted by AndroidGreg View Post
Stupid question but search didnt help, what is art? I know dalvic is a cache, but is art a replacement? What does it do and it seems as if some people are having compatibility issues? Also battery life isnt stellar for me but seems better then most as ive seen
Dalvik isn't a cache, it has to do with the way programs are compiled and run. Don't quote me but dalvik uses a JIT compiler (just in time). This means that it initially compiles all programs to a byte code (not quite machine code). When it runs a program it only needs to compile to machine code the piece of the byte code that pertains to that part of the program. This affords a smaller memory footprint and faster app installs but requires more CPU bursts to compile byte code on the fly. This increased CPU usage also leads to poorer battery life (in theory) and sometimes choppiness in the app (like when scrolling). ART on the other hand, from what I can tell is a bit more like a standard non JIT runtime. All apps are fully compiled to machine code when installed, which takes longer to install, but less CPU is required to run the app later. The fully compiled program needs to be loaded into memory which is why ART uses more physical memory when apps are running (correct me if I'm wrong). Not further compiling is needed, saving CPU bursts.

Sent from my Nexus 7 using xda app-developers app
iPhone 4 (temporary replacement)
HTC Rezound: S-ON - Unlocked - CM11 - Broked
HTC Droid Incredible: CM7-Latest/Merged - Retired
-----
Nexus 7 2013 wifi: cleanrom 2.6

Mtotho
Pronunciation :
em-toth (like both)- oh
--------
"They must find it difficult, those who have taken authority as truth, rather than truth as authority"
-Gerald Massey
 
AndroidGreg
Old
#42  
Senior Member
Thanks Meter 16
Posts: 115
Join Date: Mar 2012
Quote:
Originally Posted by mtotho View Post
Dalvik isn't a cache, it has to do with the way programs are compiled and run. Don't quote me but dalvik uses a JIT compiler (just in time). This means that it initially compiles all programs to a byte code (not quite machine code). When it runs a program it only needs to compile to machine code the piece of the byte code that pertains to that part of the program. This affords a smaller memory footprint and faster app installs but requires more CPU bursts to compile byte code on the fly. This increased CPU usage also leads to poorer battery life (in theory) and sometimes choppiness in the app (like when scrolling). ART on the other hand, from what I can tell is a bit more like a standard non JIT runtime. All apps are fully compiled to machine code when installed, which takes longer to install, but less CPU is required to run the app later. The fully compiled program needs to be loaded into memory which is why ART uses more physical memory when apps are running (correct me if I'm wrong). Not further compiling is needed, saving CPU bursts.

Sent from my Nexus 7 using xda app-developers app
So in idiots terms, dalvic means more cpu, less ram needed? and ART is the opposite? More Ram less cpu,
soo isnt the benefit gona be there for some and not for others depending on the apps they use? So is there any real difference most causal users would notice? I understand maybe some battery life but not sure comparing results in here looks like 30 min better, not much. And compatibility is my biggest worry.
Rocking out on: Current: Droid Razr Maxx HD, JB, Rooted, Not unlockable
Tablet: Nexus 7 (2013) Unlocked, Rooted
Apple: iPod touch 5th gen iOS 7.0 Jailbroken (idk why its worthless anymore)
Computers:HP Envy 15 3k i7Q ATI 7650m, 500 GB HDD, 6gb Ram, Win 7.
(New) Late 2013 MBPr, 2.6 ghz i7, Nvidia GTX 750m 1TB SSD, 16GB Ram
The Following User Says Thank You to AndroidGreg For This Useful Post: [ Click to Expand ]
 
mtotho
Old
#43  
Senior Member
Thanks Meter 104
Posts: 354
Join Date: Oct 2010
Location: Lambertville, NJ or Burlington, VT
Quote:
Originally Posted by AndroidGreg View Post
So in idiots terms, dalvic means more cpu, less ram needed? and ART is the opposite? More Ram less cpu,
soo isnt the benefit gona be there for some and not for others depending on the apps they use? So is there any real difference most causal users would notice? I understand maybe some battery life but not sure comparing results in here looks like 30 min better, not much. And compatibility is my biggest worry.
Yes. I mean in theory, especially when its optimized and not in 'beta', ART should be a no brainier. When less ram was available, dalvik was the way to go. I haven't noticed any app issues except google text to speech engine and titantium.. though I am unaware if they are currently or are going to be fixed soon.

I'm betting that ART will ultimately be the default choice and much more improvements will be made, but for right now I'm enjoying the ART performance, even if 50% of the perceived gains are in my head.

Sent from my Nexus 7 using xda app-developers app
iPhone 4 (temporary replacement)
HTC Rezound: S-ON - Unlocked - CM11 - Broked
HTC Droid Incredible: CM7-Latest/Merged - Retired
-----
Nexus 7 2013 wifi: cleanrom 2.6

Mtotho
Pronunciation :
em-toth (like both)- oh
--------
"They must find it difficult, those who have taken authority as truth, rather than truth as authority"
-Gerald Massey
 
dkryder
Old
#44  
Junior Member
Thanks Meter 1
Posts: 25
Join Date: Sep 2013
It seems to me that in using apps many of them crash or otherwise have problems with ART. Sorta like they need to be rewritten to run well using ART. I have no idea/why or even if this is in fact an issue, it just seems that way to me.
 
adamrharding
Old
(Last edited by adamrharding; 23rd January 2014 at 03:31 PM.) Reason: noticed incorrect explanation
#45  
Junior Member
Thanks Meter 0
Posts: 4
Join Date: Nov 2011
Question Battery problems

On art and constantly upgrade to CM nightlies, which may be my issue. The symptom, is that if i am using chrome, dolphin, tapatalk, email, gmail or pretty much anything for more than 5 minutes, excluding text, talk and lookout say, the phone (galaxy s4) powers down. I can't then reboot it until i have it on power, weird that, no? I can leave standby on until say 40% and it happens or as much as 85% is this down to nightlies, or my battery?

I am running the performance level of the CPU between 1026 and 1890, could this be causing a problem, though thinking about it as I am on ART, i could cut the CPU back more as it is more RAM access, if i understand correctly. The best explanation of davlik is that i doesn't install the apps to the phone directly, it installs into a virtual machine which is the same across every device, meaning no re-config per device. ART installs the apps directly to the phone and a more complete set of code specific to your device which is why it uses more RAM but is faster.

Anyone got any thoughts?

Cheers
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Prevent Unwanted Butt Dialing with Smart Pocket Guard

You may recall that back in August of last year, we took a look atAir SwiperbyXDA … more

Google ATAP Details Project Ara in Developers’ Conference

Earlier today, the Google ATAP teamkicked offits first ever Project Ara … more

HTC Sense 6 Ported to the Nexus 5

The Google Nexus 5 is regarded as having everything an Android user needs or wants: timely updates, … more