CN

loading
Android App Startup Optimization - DelayLoad Implementation and Principles (Part 1)

To make an Android app start faster, the main idea is to do less during startup. In practice, we usually reach for:

  1. Asynchronous Loading
  2. Delayed Loading (DelayLoad)
  3. Lazy Loading

If you have worked on startup optimization, you have probably used these already. Here I want to look at one DelayLoad implementation and why it behaves as it does. The code is simple, but following it takes us through Looper, Handler, MessageQueue, and VSYNC. I’ll also discuss the problems I ran into and some thoughts along the way.