[M120 Migration][PERF]Setting low-end device memory threshold as was in M94 52/306252/4
authorchiragmaheshwari <c.maheshwari@samsung.com>
Mon, 19 Feb 2024 07:25:15 +0000 (12:55 +0530)
committerBot Blink <blinkbot@samsung.com>
Wed, 21 Feb 2024 00:46:23 +0000 (00:46 +0000)
Chromium checks whether current device is low-end device in
`SysInfo::IsLowEndDevice`. Main test is based on how much RAM is
installed on the device. Between M94 and M108 this threshold has been
raised from 512MiB to 2GiB. As most of Tizen TV devices has less then
2GiB RAM available, this causes that these devices are considered
low-end ones.

This causes that `--optimize-for-size` flag is passed to V8 in
`RenderProcessImpl` ctor. Although this indeed lowers memory pressure, it
has also very negative performance implications. So to keep performance
of M108 Chromium on Tizen TVs this patch changes threshold to one used
for M94.

Patch form:
https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/292472/

Reference: https://review.tizen.org/gerrit/c/platform/framework/web/chromium-efl/+/293179

Change-Id: Ieb1cad80ff96deca6bb23cd9e262870964b3a1f5
Signed-off-by: chiragmaheshwari <c.maheshwari@samsung.com>
base/system/sys_info.cc

index 82cebf2..6ab519f 100644 (file)
@@ -24,6 +24,9 @@ namespace {
 #if BUILDFLAG(IS_IOS)
 // For M99, 45% of devices have 2GB of RAM, and 55% have more.
 constexpr uint64_t kLowMemoryDeviceThresholdMB = 1024;
+#elif BUILDFLAG(IS_TIZEN_TV)
+// Tizen TVs have very little RAM, so keep the same limit as for M94.
+constexpr uint64_t kLowMemoryDeviceThresholdMB = 512;
 #else
 // Updated Desktop default threshold to match the Android 2021 definition.
 constexpr uint64_t kLowMemoryDeviceThresholdMB = 2048;