From 0f3b87eff6342e7e2fe8ac0f57a76474f95908bb Mon Sep 17 00:00:00 2001 From: aalajimaestro Date: Tue, 15 Aug 2023 09:42:17 +0300 Subject: [PATCH] sm6375-common: Optimise dex flags This is a squash of the following commits: 1. Optimise dex flags for a faster boot * Used multiple threads and speed profile to hasten the first boot Signed-off-by: baalajimaestro Change-Id: I2cce5ddf7d50308511e81436fcac613b2c6537bf 2. Rework dex flags again When I went through https://source.android.com/devices/tech/dalvik/configure my previous configs felt wrong, this one should be perfect (I hope). Even though there is a slight trade-off for boot time by using the speed profile, we do make up for it by using 8 threads. PRODUCT_DEX_PREOPT_DEFAULT_COMPILER_FILTER attempts to compile all prebuilts fully optimised to speed level, thus the phone doesnt need to deal with it. I also do know that this might be a trade-off on size, but I do see the first boot time is more worthy to trade-off. The speed level mentioned here runs dex verification and compiles all AOT methods. Signed-off-by: baalajimaestro Signed-off-by: Omkar Chandorkar Change-Id: Ic0156ff8956a7c5f53820be6db438f6f6399d3c0 3. Switch certain dexopt profiles to verify Prebuilt apps like Gmail/Google App, will be updated by google play, and there is no need spend time and space optimising what is going to be replaced. Switch to Google's recommendation of using verify for an OTA package. Applications still stay on speed. Instead, replace the install profile with speed-profile making apps perform better. 13.0 --- device.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/device.mk b/device.mk index 56475ac..34cb0be 100644 --- a/device.mk +++ b/device.mk @@ -115,7 +115,10 @@ PRODUCT_PACKAGES += \ android.hardware.ir@1.0-service # Dex +PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD := false PRODUCT_DEX_PREOPT_DEFAULT_COMPILER_FILTER := verify +PRODUCT_MINIMIZE_JAVA_DEBUG_INFO := true +USE_DEX2OAT_DEBUG := false # Display PRODUCT_PACKAGES += \