diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-07-17 03:03:26 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-07-17 03:03:26 +0000 |
commit | 732aeaf05fdff34813b4853c5af0bc82fcc6be30 (patch) | |
tree | 1313c193b8f5afe2de48421dcf1591085b2e2bc2 | |
parent | 9dc26eade12abfd6ea592c63e81c9321d90afe88 (diff) | |
parent | 294421ca6ac449cd9279aaabc63cb4bb080acca3 (diff) | |
download | icing-732aeaf05fdff34813b4853c5af0bc82fcc6be30.tar.gz |
Snap for 7557983 from 294421ca6ac449cd9279aaabc63cb4bb080acca3 to sc-release
Change-Id: I7191b94231f05a241c737af9b67d817270b879bf
-rw-r--r-- | icing/performance-configuration.cc | 5 |
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); |