Quote:
Originally Posted by ali_loly10
i still don't know what is Dalvik cache and what does it do
|
Learn how Java language work, understand what is the bytecode and when does a Java program compiles and you will understand the purpose of Dalvik.
A java program is composed of (many) classes and ressources, etc...
Classes files are in Java sourcecode format (.java in .jar packages)
In order to run on a processor it must become binary, so the java source code must be compiled.
The binary code (ByteCode) resulting from compilation is independent from the processor architecture.
Then it runs in a virtual machine, that's the role of JavaVirtualMachine (the one about 25MB you download from oracle.com) or here the Dalvik's one.
A java program will always run on a device where a recent JVM is available, just as .NET C# with MS .Net Framework.
It would be silly to compile it each time you run a APK, so the Dalvik cache stores ByteCode, moreover it makes complex adjustments http://android.git.kernel.org/?p=pla...t.html;hb=HEAD
Finally the ByteCode is converted in an .dex Dalvik EXecutable and run.
That's why when you first launch an app it can take long time to start.
PS: I'm not a developer so don't hesitate to correct this short explanation
|