diff --git a/Patches/LineageOS-14.1/android_device_asus_grouper/0002-Perf_Tweaks.patch b/Patches/LineageOS-14.1/android_device_asus_grouper/0002-Perf_Tweaks.patch index c7444c75..067f3f68 100644 --- a/Patches/LineageOS-14.1/android_device_asus_grouper/0002-Perf_Tweaks.patch +++ b/Patches/LineageOS-14.1/android_device_asus_grouper/0002-Perf_Tweaks.patch @@ -1,156 +1,115 @@ -From d4eb3d10d870bd61ea63fd3e32232c41213c0be1 Mon Sep 17 00:00:00 2001 +From 08c7e33d75eb9c8546db621e6ca28bd9ca922402 Mon Sep 17 00:00:00 2001 From: Tad -Date: Tue, 10 Jul 2018 17:44:37 -0400 +Date: Tue, 10 Jul 2018 19:38:55 -0400 Subject: [PATCH] Performance tweaks from @AndDiSa -Change-Id: Iec5622c061565d362cdeda32d030015e5e90e6fd +Change-Id: I481bd5ac610247cdcae1af42620a36ca5943505e --- - BoardConfig.mk | 1 + - BoardConfigCommon.mk | 3 ++ - device-common.mk | 20 +++++++++++ - device.mk | 1 + - .../base/core/res/res/values/config.xml | 7 +++- - system.prop | 35 +++++++++++++++++-- - 6 files changed, 63 insertions(+), 4 deletions(-) + BoardConfigCommon.mk | 4 ++ + device.mk | 3 +- + .../base/core/res/res/values/config.xml | 7 ++++ + system.prop | 39 +++++++++++++++++-- + 4 files changed, 49 insertions(+), 4 deletions(-) -diff --git a/BoardConfig.mk b/BoardConfig.mk -index aa8876b..2bc159f 100644 ---- a/BoardConfig.mk -+++ b/BoardConfig.mk -@@ -18,3 +18,4 @@ TARGET_RELEASETOOLS_EXTENSIONS := device/asus/grouper - include device/asus/grouper/BoardConfigCommon.mk - - TARGET_RECOVERY_FSTAB := device/asus/grouper/rootdir/fstab.grouper -+BOARD_EGL_WORKAROUND_BUG_10194508 := true diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk -index f402c86..0cff477 100644 +index f402c86..2ea1317 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk -@@ -53,6 +53,9 @@ BOARD_SYSTEMIMAGE_JOURNAL_SIZE := 0 - # Only pre-optimize the boot image - WITH_DEXPREOPT_BOOT_IMG_ONLY := true +@@ -20,6 +20,9 @@ TARGET_ARCH := arm + TARGET_ARCH_VARIANT := armv7-a-neon + TARGET_CPU_VARIANT := cortex-a9 -+# Avoid the generation of ldrcc instructions ++BOARD_EGL_WORKAROUND_BUG_10194508 := true +NEED_WORKAROUND_CORTEX_A9_745320 := true + + TARGET_BOOTLOADER_BOARD_NAME := grouper + + # Filesystem +@@ -52,6 +55,7 @@ BOARD_SYSTEMIMAGE_JOURNAL_SIZE := 0 + + # Only pre-optimize the boot image + WITH_DEXPREOPT_BOOT_IMG_ONLY := true ++PRODUCT_SYSTEM_SERVER_COMPILER_FILTER := speed-profile + # Configure jemalloc for low-memory MALLOC_SVELTE := true - -diff --git a/device-common.mk b/device-common.mk -index ac66bec..daae064 100644 ---- a/device-common.mk -+++ b/device-common.mk -@@ -25,6 +25,26 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk) - # Dalvik VM config - $(call inherit-product, frameworks/native/build/tablet-7in-hdpi-1024-dalvik-heap.mk) - -+# Set lowram options -+PRODUCT_PROPERTY_OVERRIDES += \ -+ ro.lmk.critical_upgrade=true \ -+ ro.lmk.upgrade_pressure=40 -+ -+# Default heap sizes. Allow up to 256m for large heaps to make sure a single app -+# doesn't take all of the RAM. -+PRODUCT_PROPERTY_OVERRIDES += dalvik.vm.heapgrowthlimit=128m -+PRODUCT_PROPERTY_OVERRIDES += dalvik.vm.heapsize=256m -+ -+# ART -+PRODUCT_PROPERTY_OVERRIDES += \ -+ dalvik.vm.dex2oat-flags=--no-watch-dog \ -+ dalvik.vm.dex2oat-swap=true \ -+ ro.sys.fw.dex2oat_thread_count=4 -+ -+# libhwui flags -+PRODUCT_PROPERTY_OVERRIDES += \ -+ debug.hwui.render_dirty_regions=false -+ - # Init files - PRODUCT_COPY_FILES += \ - device/asus/grouper/rootdir/init.grouper.usb.rc:root/init.grouper.usb.rc \ diff --git a/device.mk b/device.mk -index 33c1fc9..ecaece8 100644 +index 33c1fc9..8d8c65a 100644 --- a/device.mk +++ b/device.mk -@@ -25,6 +25,7 @@ PRODUCT_COPY_FILES += \ +@@ -24,7 +24,8 @@ PRODUCT_COPY_FILES += \ + device/asus/grouper/rootdir/init.grouper.sensors.rc:root/init.grouper.sensors.rc PRODUCT_PROPERTY_OVERRIDES += \ - ro.carrier=wifi-only +- ro.carrier=wifi-only ++ ro.carrier=wifi-only \ + ro.radio.noril=true DEVICE_PACKAGE_OVERLAYS += \ device/asus/grouper/overlay diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml -index d28e4fb..61c1c0e 100644 +index d28e4fb..c9ec73a 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml -@@ -18,7 +18,6 @@ - --> - - -- - -@@ -216,7 +215,13 @@ - - 6 +@@ -219,4 +219,11 @@ + + true + + -1 + 0 + - - true - + + false ++ diff --git a/system.prop b/system.prop -index b1d9807..37415d4 100644 +index b1d9807..7f540b5 100644 --- a/system.prop +++ b/system.prop -@@ -9,9 +9,38 @@ ro.zygote.disable_gl_preload=true - # Set default LCD density to TVDPI - ro.sf.lcd_density=213 - -+ro.sys.fw.bg_apps_limit = 12 -+ro.sys.fw.use_trim_settings=true -+ro.sys.fw.trim_empty_percent=70 -+ro.sys.fw.trim_cache_percent=70 -+ro.config.max_starting_bg=8 -+ +@@ -12,6 +12,39 @@ ro.sf.lcd_density=213 # Wi-Fi wifi.interface=wlan0 -# Configure PRISM, but disable it by default -persist.tegra.didim.video=5 -persist.tegra.didim.enable=0 -+# don't preload OpenGL in Zygote, the Tegra drivers do not like it -+ro.zygote.disable_gl_preload=true -+ +# configure PRISM +persist.tegra.didim.video = 5 +persist.tegra.didim.enable = 1 +persist.tegra.didim.normal = 3 + -+# Dalvik and other tweaks -+dalvik.vm.heapgrowthlimit=128m -+dalvik.vm.heapsize=256m -+ro.ril.disable.power.collapse=0 -+pm.sleep_mode=1 -+ro.config.hw_power_saving=true ++# don't preload OpenGL in Zygote, the Tegra drivers do not like it ++ro.zygote.disable_gl_preload=true ++ ++#perf tweaks ++config.disable_atlas=true ++dalvik.vm.dex2oat-flags=--no-watch-dog ++dalvik.vm.dex2oat-swap=true ++debug.hwui.render_dirty_regions=false +persist.debug.wfd.enable=1 +persist.sys.force_highendgfx=true -+config.disable_atlas=true -+ -+# 16bit Transparency -+persist.sys.use_16bpp_alpha=1 -+ -+#config low ram device -+#ro.config.low_ram=true -+ -+#disable scrolling cache (1 = on, 2 = sometimes on, 3 = sometimes off, 4 = allways off) +persist.sys.scrollingcache=1 ++persist.sys.use_16bpp_alpha=1 ++pm.sleep_mode=1 ++ro.config.hw_power_saving=true ++ro.config.max_starting_bg=8 ++ro.ril.disable.power.collapse=0 ++ro.sys.fw.bg_apps_limit=12 ++ro.sys.fw.dex2oat_thread_count=4 ++ro.sys.fw.trim_cache_percent=70 ++ro.sys.fw.trim_empty_percent=70 ++ro.sys.fw.use_trim_settings=true ++ ++#go ++dalvik.vm.heapgrowthlimit=128m ++dalvik.vm.heapsize=256m ++dalvik.vm.madvise-random=true ++pm.dexopt.downgrade_after_inactive_days=10 ++pm.dexopt.shared=quicken ++ro.config.low_ram=true ++ro.lmk.critical_upgrade=true ++ro.lmk.upgrade_pressure=40 -- 2.18.0