aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbaalajimaestro <me@baalajimaestro.me>2022-03-19 19:51:45 -0300
committersinanmohd <pcmsinan@gmail.com>2023-01-05 22:04:15 +0530
commit0d9fa0b4244e029de8da4c33d883a74b7e2ffb97 (patch)
tree0973f9d6ef72896180e292d2088aab5122a78fc7
parent9b3994163a27c814d16efe5ccc890ed93a8f44fe (diff)
veux: props: 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 <me@baalajimaestro.me> 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 <me@baalajimaestro.me> Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev> 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. Signed-off-by: baalajimaestro <me@baalajimaestro.me> Change-Id: I2cce5ddf7d50308511e81436fcac613b2c6537bf
-rw-r--r--device.mk3
-rw-r--r--vendor.prop9
2 files changed, 12 insertions, 0 deletions
diff --git a/device.mk b/device.mk
index c9460b4..880bfa5 100644
--- a/device.mk
+++ b/device.mk
@@ -131,6 +131,9 @@ PRODUCT_PACKAGES += \
PRODUCT_AAPT_CONFIG := normal
PRODUCT_AAPT_PREF_CONFIG := xxhdpi
+# Dex
+PRODUCT_DEX_PREOPT_DEFAULT_COMPILER_FILTER := verify
+
# DeviceSettings
PRODUCT_PACKAGES += \
XiaomiParts
diff --git a/vendor.prop b/vendor.prop
index ed8433f..475fba7 100644
--- a/vendor.prop
+++ b/vendor.prop
@@ -152,6 +152,15 @@ ro.soc.model=SM6375
ro.crypto.dm_default_key.options_format.version=2
ro.crypto.volume.metadata.method=dm-default-key
+# Dex2oat
+pm.dexopt.boot=verify
+pm.dexopt.first-boot=verify
+pm.dexopt.install=speed-profile
+dalvik.vm.image-dex2oat-filter=speed
+dalvik.vm.image-dex2oat-threads=8
+dalvik.vm.dex2oat-filter=speed
+dalvik.vm.dex2oat-threads=8
+
# Display
ro.vendor.display.svi=1
vendor.display.svi.config=1