What does the dalvik cache do?

Got a problem with your Scroll? Unsure how to do something? Ask here! (ANY Model)

What does the dalvik cache do?

Postby glostermeteor » January 19th, 2011, 9:14 am

I have performed an update to my Build.Prop file as per the method described in the forum.

I would like to know what does the dalvik cache do? It says this has been increased.

Glostermeteor
glostermeteor
Scroll Apprentice
Scroll Apprentice
 
Posts: 48
Joined: January 12th, 2011, 9:44 am

Re: What does the dalvik cache do?

Postby Fonefixer » January 19th, 2011, 10:25 am

I believe its similar to the prefetch folder in windows. It stores files for quicker future access.

Someone may have a better answer though..
Dave

Employees are like mules. Some you stand in front of and coax them along with a carrot. Some you stand behind and kick them in the arse. The key to management is knowing which mules are which!
User avatar
Fonefixer
Honoured Contributor
Honoured Contributor
 
Posts: 1372
Joined: January 2nd, 2011, 8:31 am
Location: Vertical & Breathing
Real Name: Dave
Scroll Version: Scroll Excel

Re: What does the dalvik cache do?

Postby Warpedflash » January 19th, 2011, 10:40 am

Simple explanation:

When Android starts up, the DalvikVM looks thru all of your applications (.apk files) and frameworks, and builds a tree of dependencies. It uses this dependency tree to optimize the bytecode for every application and stores it in the Dalvik cache. The applications are then run using the optimized bytecode. This is why when you install a new ROM, sometimes it takes a very long time to boot for the first time. Any time an application (or framework library) changes, it's reoptimized and the cache is updated.


stolen from here: http://forum.xda-developers.com/showthread.php?t=519495
Firmware Version: 1.01 - Latest known update - Locked Bootloader - No Market
viewtopic.php?f=27&t=125 - How to Root your Scroll
viewtopic.php?f=27&t=127 - How to Install Clockwork
viewtopic.php?f=27&t=147 - How to Replace build.prop
User avatar
Warpedflash
Scroll Genuis
Scroll Genuis
 
Posts: 723
Joined: January 4th, 2011, 5:36 pm

Re: What does the dalvik cache do?

Postby krulimiteer » January 19th, 2011, 7:07 pm

How have you increased the Dalvik cache, doesnt it just increase incrementally as needed. If you have set it to have a specific max size have you moved it onto a seperate partition?
krulimiteer
Junior Scroller
Junior Scroller
 
Posts: 13
Joined: January 19th, 2011, 6:42 pm

Re: What does the dalvik cache do?

Postby Diego » January 19th, 2011, 7:09 pm

Most things of this nature have a limit and dump older data on need.
ImageImageThere's only one way off, might as well enjoy the ride..
Image
_________________________________________________________
firmware v1.00 kernel 2.6.29 Andriod 2.1
User avatar
Diego
Donator
Donator
 
Posts: 474
Joined: December 28th, 2010, 12:50 pm
Location: Naphoria

Re: What does the dalvik cache do?

Postby krulimiteer » January 19th, 2011, 7:24 pm

Okay, but why increase it to that much manually, just let it do its job, by forcing it to have a specific size doesnt it just fill with useless data from old apps and back to square one, most dont like it taking up app storage space so have moved it to sd storage
krulimiteer
Junior Scroller
Junior Scroller
 
Posts: 13
Joined: January 19th, 2011, 6:42 pm

Re: What does the dalvik cache do?

Postby Warpedflash » January 19th, 2011, 9:57 pm

no it does not expand automatically. having a higher size means that more stuff will open faster.
also it uses ram... not nand space
Firmware Version: 1.01 - Latest known update - Locked Bootloader - No Market
viewtopic.php?f=27&t=125 - How to Root your Scroll
viewtopic.php?f=27&t=127 - How to Install Clockwork
viewtopic.php?f=27&t=147 - How to Replace build.prop
User avatar
Warpedflash
Scroll Genuis
Scroll Genuis
 
Posts: 723
Joined: January 4th, 2011, 5:36 pm

Re: What does the dalvik cache do?

Postby krulimiteer » January 20th, 2011, 1:28 am

I wasnt meaning any memory mapped bytecode used by the dalvik vm, but the actual Dalvik cache where apk dex files are stored, and yes indeed it is usual stored on nand space, and yes it does expand with the amount of apps you have installed. Explained here from the Cyanogen forum:

"Dalvik-cache lives on the /data partition, and is the cache for the Dalvik virtual machine (it basically optimizes your programs to run on your phone, and stores the optimized versions.) Also, nothing bad will ever happen if you wipe your dalvik-cache. It WILL make your phone take longer to boot the first time after you clear it (since it has to re-build it), but it doesn't break anything. If you've uninstalled an app, and haven't wiped your dalvik-cache, that app's .dex file is still on your phone, slowing it down (probably imperceptibly, but still ;-) )"

Post #1097 by SeidoJohn
http://forum.cyanogenmod.com/topic/2...page__st__1080

references:
http://imsciences.edu.pk/serg/wp-conten ... vik-VM.pdf
http://www.netmite.com/android/mydroid/ ... exopt.html
krulimiteer
Junior Scroller
Junior Scroller
 
Posts: 13
Joined: January 19th, 2011, 6:42 pm

Re: What does the dalvik cache do?

Postby Warpedflash » January 20th, 2011, 8:46 am

huh more you know eh.
you can always reduce it if you want to? It give a boost in system performance thas why it was done. go change it if you want to? change it back to 24 if you think thats what it should be.

Also i saved v3 of my build.prop without unix line endings so you get a nice square if you view it/change it with root explorer.
Firmware Version: 1.01 - Latest known update - Locked Bootloader - No Market
viewtopic.php?f=27&t=125 - How to Root your Scroll
viewtopic.php?f=27&t=127 - How to Install Clockwork
viewtopic.php?f=27&t=147 - How to Replace build.prop
User avatar
Warpedflash
Scroll Genuis
Scroll Genuis
 
Posts: 723
Joined: January 4th, 2011, 5:36 pm

Re: What does the dalvik cache do?

Postby krulimiteer » January 20th, 2011, 9:21 am

Yes sorry I think we got our wires crossed, you were, or are talking about dalvik max heapsize that you have increased in the build.prop, whereas I was refering to dex files stored in dalvik cache. I have increased heapsize to 40 as that seems to be the optimal value, and as you say 24 is low and people have had problems with adobe runnuing out of memory at that setting, but I have not found increasing over 40 to have any benefits, possibly the opposite. Interesting thread on this here:
http://osdir.com/ml/android-platform/20 ... 00177.html
krulimiteer
Junior Scroller
Junior Scroller
 
Posts: 13
Joined: January 19th, 2011, 6:42 pm

Next

Return to HELP REQUESTS (all models)

Who is online

Users browsing this forum: No registered users and 11 guests

cron