public static final class id { public static final int ALT=0x7f070000; public static final int CTRL=0x7f070001; public static final int FUNCTION=0x7f070002; public static final int META=0x7f070003; public static final int SHIFT=0x7f070004; public static final int SYM=0x7f070005; public static final int action_bar=0x7f070006; public static final int action_bar_activity_content=0x7f070007; public static final int action_bar_container=0x7f070008; }
public static final class id { public static final int ALT=0x7f070000; public static final int CTRL=0x7f070001; public static final int FUNCTION=0x7f070002; public static final int META=0x7f070003; public static final int SHIFT=0x7f070004; public static final int SYM=0x7f070005; public static final int action_bar=0x7f070006; public static final int action_bar_activity_content=0x7f070007; public static final int action_bar_constraintLayout=0x7f070008; public static final int action_bar_container=0x7f070009; } PP TT NNNN
Dalvik Upto KitKat •Byte Code Verification To check the integrity of Dex Done at install time rather than run time. Validity of indices and structure of file.
Dalvik Upto KitKat •Byte Code Verification To check the integrity of Dex Done at install time rather than run time. Validity of indices and structure of file. Ordering of the instructions.
Dalvik Upto KitKat •Optimizations VTable Method Index for method invocation. Replacing high volume of methods with their inline versions. Prune empty methods.
Dalvik Upto KitKat •Optimizations VTable Method Index for method invocation. Replacing high volume of methods with their inline versions. Prune empty methods. Pre computations.
Dalvik Upto KitKat •Optimizations VTable Method Index for method invocation. Replacing high volume of methods with their inline versions. Prune empty methods. Pre computations. dexopt ODEX
dex file, oat file ART Execute method Is it compiled ? Is it JIT compiled Y Run code from .oat file N N Interpreter Run code from jit cache Y Record Profiles info
dex file, oat file ART Execute method Is it compiled ? Is it JIT compiled Y Run code from .oat file N N Interpreter Is it hot? Run code from jit cache Y Record Profiles info
dex file, oat file ART Execute method Is it compiled ? Is it JIT compiled Y Run code from .oat file N N Interpreter Is it hot? JIT Cache Run code from jit cache Y Record Profiles info Y
dex file, oat file ART Execute method Is it compiled ? Is it JIT compiled Y Run code from .oat file N N Interpreter Is it hot? JIT Cache Run code from jit cache Y Record Profiles info N Y
dex file, oat file ART Execute method Is it compiled ? Is it JIT compiled Y Run code from .oat file N N Interpreter Is it hot? JIT Cache Run code from jit cache Y Record Profiles info N Y When Profile guided compilation occurs?
Time for tips • Use lazy initializations. • Don’t use reflections at time of APP startup • Initialize all the SDKs in background • Load images asynchronously. • Avoid nesting layout