14.1: Improved grouper perf tweaks

This commit is contained in:
Tad 2018-07-10 19:39:17 -04:00
parent 8b2902fd94
commit 746c925a22

View File

@ -1,156 +1,115 @@
From d4eb3d10d870bd61ea63fd3e32232c41213c0be1 Mon Sep 17 00:00:00 2001 From 08c7e33d75eb9c8546db621e6ca28bd9ca922402 Mon Sep 17 00:00:00 2001
From: Tad <tad@spotco.us> From: Tad <tad@spotco.us>
Date: Tue, 10 Jul 2018 17:44:37 -0400 Date: Tue, 10 Jul 2018 19:38:55 -0400
Subject: [PATCH] Performance tweaks from @AndDiSa Subject: [PATCH] Performance tweaks from @AndDiSa
Change-Id: Iec5622c061565d362cdeda32d030015e5e90e6fd Change-Id: I481bd5ac610247cdcae1af42620a36ca5943505e
--- ---
BoardConfig.mk | 1 + BoardConfigCommon.mk | 4 ++
BoardConfigCommon.mk | 3 ++ device.mk | 3 +-
device-common.mk | 20 +++++++++++ .../base/core/res/res/values/config.xml | 7 ++++
device.mk | 1 + system.prop | 39 +++++++++++++++++--
.../base/core/res/res/values/config.xml | 7 +++- 4 files changed, 49 insertions(+), 4 deletions(-)
system.prop | 35 +++++++++++++++++--
6 files changed, 63 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 diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk
index f402c86..0cff477 100644 index f402c86..2ea1317 100644
--- a/BoardConfigCommon.mk --- a/BoardConfigCommon.mk
+++ b/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk
@@ -53,6 +53,9 @@ BOARD_SYSTEMIMAGE_JOURNAL_SIZE := 0 @@ -20,6 +20,9 @@ TARGET_ARCH := arm
# Only pre-optimize the boot image TARGET_ARCH_VARIANT := armv7-a-neon
WITH_DEXPREOPT_BOOT_IMG_ONLY := true TARGET_CPU_VARIANT := cortex-a9
+# Avoid the generation of ldrcc instructions +BOARD_EGL_WORKAROUND_BUG_10194508 := true
+NEED_WORKAROUND_CORTEX_A9_745320 := 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 # Configure jemalloc for low-memory
MALLOC_SVELTE := true 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 diff --git a/device.mk b/device.mk
index 33c1fc9..ecaece8 100644 index 33c1fc9..8d8c65a 100644
--- a/device.mk --- a/device.mk
+++ b/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 += \ PRODUCT_PROPERTY_OVERRIDES += \
ro.carrier=wifi-only - ro.carrier=wifi-only
+ ro.carrier=wifi-only \
+ ro.radio.noril=true + ro.radio.noril=true
DEVICE_PACKAGE_OVERLAYS += \ DEVICE_PACKAGE_OVERLAYS += \
device/asus/grouper/overlay 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 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 --- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -18,7 +18,6 @@ @@ -219,4 +219,11 @@
--> <!-- Enable doze powersaving -->
<bool name="config_enableAutoPowerModes">true</bool>
<resources>
-
<!-- This string array should be overridden by the device to present a list of network
attributes. This is used by the connectivity manager to decide which networks can coexist
based on the hardware -->
@@ -216,7 +215,13 @@
<!-- reference volume index for music stream to limit headphone volume and display warning -->
<integer name="config_safe_media_volume_index">6</integer>
+ <!-- Set lowmemorykiller threshold --> + <!-- Set lowmemorykiller threshold -->
+ <integer name="config_lowMemoryKillerMinFreeKbytesAbsolute">-1</integer> + <integer name="config_lowMemoryKillerMinFreeKbytesAbsolute">-1</integer>
+ <integer name="config_lowMemoryKillerMinFreeKbytesAdjust">0</integer> + <integer name="config_lowMemoryKillerMinFreeKbytesAdjust">0</integer>
+ +
<!-- Enable doze powersaving -->
<bool name="config_enableAutoPowerModes">true</bool>
+ <!-- Whether to enable HumanInteractionController by default --> + <!-- Whether to enable HumanInteractionController by default -->
+ <bool name="config_HICEnabledDefault">false</bool> + <bool name="config_HICEnabledDefault">false</bool>
+
</resources> </resources>
diff --git a/system.prop b/system.prop diff --git a/system.prop b/system.prop
index b1d9807..37415d4 100644 index b1d9807..7f540b5 100644
--- a/system.prop --- a/system.prop
+++ b/system.prop +++ b/system.prop
@@ -9,9 +9,38 @@ ro.zygote.disable_gl_preload=true @@ -12,6 +12,39 @@ ro.sf.lcd_density=213
# 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
+
# Wi-Fi # Wi-Fi
wifi.interface=wlan0 wifi.interface=wlan0
-# Configure PRISM, but disable it by default -# Configure PRISM, but disable it by default
-persist.tegra.didim.video=5 -persist.tegra.didim.video=5
-persist.tegra.didim.enable=0 -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 +# configure PRISM
+persist.tegra.didim.video = 5 +persist.tegra.didim.video = 5
+persist.tegra.didim.enable = 1 +persist.tegra.didim.enable = 1
+persist.tegra.didim.normal = 3 +persist.tegra.didim.normal = 3
+ +
+# Dalvik and other tweaks +# don't preload OpenGL in Zygote, the Tegra drivers do not like it
+dalvik.vm.heapgrowthlimit=128m +ro.zygote.disable_gl_preload=true
+dalvik.vm.heapsize=256m +
+ro.ril.disable.power.collapse=0 +#perf tweaks
+pm.sleep_mode=1 +config.disable_atlas=true
+ro.config.hw_power_saving=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.debug.wfd.enable=1
+persist.sys.force_highendgfx=true +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.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 2.18.0