What is Dalvik Cache?

Dalvik Virtual Machine

One of the best functions of Android has to be the Dalvik cache. Dalvik cache is a wonder from the point your Android starts up, runs, hibernates and all the way till you device shuts down. Dalvik cache collects the information about the installed applications and frameworks, and organizes them into a writeable cache. Under this writeable cache, it stores the “optimized” bytecode of the applications which is used by the applications themselves later for a smoother operation. This dalvik cache can grow immensely huge as more applications are installed on your phone. It is safe to wipe dalvik-cache. It will be rebuilt again when the phone boots. This also explains why your phone takes ages to start up for the first time. As for my Nexus One, having about 145 applications installed, it takes about 13 minutes to build the cache.

If you ever extract an APK installer file, you will always find a file named classes.dex. This is the file Dalvik finds to build the cache. What makes the process slow? APK is an archive (which is why you can open it up with an unarchiver such as WinRAR or 7-Zip). Being an archive, it provides limited write access to the files contained within and the fact that archives are compressed. Not to forget, APKs are encrypted archives too. Therefore, DalvikVM has to extract the classes.dex files and build the Dalvik table accordingly which makes it easier to write data on it too. With this collective set of data, the Android OS no longer needs to index the applications and find their classes.dex when the phone is already running. Instead, it will just look into one place, and will know what to do next. Nifty huh?

To know what is going on inside the Dalvik VM, you can read about it here.

  1. Victor
    #1 written by Victor  (2 years ago)

    very brief and resourceful. great

  2. netholik
    #2 written by netholik  (2 years ago)

    excellent explanation! :)

  3. ps4 games price
    #3 written by ps4 games price (4 months ago)

    Why the Grand Thief Auto has several controversial concern is the player of the game themselves.
    It also supports high definition audio including Dolby True
    - HD and DTS-HD Master Audio. This nonprofit organization is located in Des Plaines,
    Illinois. Intrapreneurship has been successfully employed by corporations, partnerships, and non-profit firms inside the US, Europe,
    Asia, and Africa.

  4. xbox one pre order
    #4 written by xbox one pre order (4 months ago)

    If then when additional 360 wireless peripherals are released, however, they
    must also be compatible. Also, if it is possible, try messing around with your Xbox 360 in a air conditioned room.

    You could be electrified when you touch Xbox 360
    casing due to electrostatic induction). In The Beginning
    this year, but Steve Froggatt ends again the favourite.
    Users should transform it into a regular habit to repeat their Xbox 360 games to make
    sure that they are always readily accessible.

  5. You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  6. Comment Feed for this Post
Go to Top