Use speed-profile instead of quicken for the profile case
Reduces calculator launch from 354 -> 325 with a profile.
Bug: 38032017
Test: mm
Change-Id: I795a2d3f4db5546be4d77c3716e69d20d8f23549
diff --git a/core/dex_preopt_odex_install.mk b/core/dex_preopt_odex_install.mk
index a3fb410..f078510 100644
--- a/core/dex_preopt_odex_install.mk
+++ b/core/dex_preopt_odex_install.mk
@@ -159,7 +159,12 @@
else
# If no compiler filter is specified, default to 'quicken' to save on storage.
ifeq (,$(filter --compiler-filter=%, $(LOCAL_DEX_PREOPT_FLAGS)))
- LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=quicken
+ ifeq (true,$(LOCAL_DEX_PREOPT_GENERATE_PROFILE))
+ # For non system server jars, use speed-profile when we have a profile.
+ LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=speed-profile
+ else
+ LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=quicken
+ endif
endif
endif