aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-07-17 03:03:26 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-07-17 03:03:26 +0000
commit732aeaf05fdff34813b4853c5af0bc82fcc6be30 (patch)
tree1313c193b8f5afe2de48421dcf1591085b2e2bc2
parent9dc26eade12abfd6ea592c63e81c9321d90afe88 (diff)
parent294421ca6ac449cd9279aaabc63cb4bb080acca3 (diff)
downloadicing-732aeaf05fdff34813b4853c5af0bc82fcc6be30.tar.gz
Snap for 7557983 from 294421ca6ac449cd9279aaabc63cb4bb080acca3 to sc-release
Change-Id: I7191b94231f05a241c737af9b67d817270b879bf
-rw-r--r--icing/performance-configuration.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/icing/performance-configuration.cc b/icing/performance-configuration.cc
index 45b03d3..4020dd0 100644
--- a/icing/performance-configuration.cc
+++ b/icing/performance-configuration.cc
@@ -55,11 +55,12 @@ constexpr int kMaxQueryLength = 23000;
constexpr int kDefaultNumToScore = 30000;
// New Android devices nowadays all allow more than 16 MB memory per app. Using
-// that as a guideline, we set 16 MB as the safe memory threshold.
+// that as a guideline and being more conservative, we set 4 MB as the safe
+// memory threshold.
// TODO(b/150029642): Android apps / framework have better understanding of how
// much memory is allowed, so it would be better to let clients pass in this
// value.
-constexpr int kSafeMemoryUsage = 16 * 1024 * 1024; // 16MB
+constexpr int kSafeMemoryUsage = 4 * 1024 * 1024; // 4MB
// The maximum number of hits that can fit below the kSafeMemoryUsage threshold.
constexpr int kMaxNumTotalHits = kSafeMemoryUsage / sizeof(ScoredDocumentHit);