diff --git a/Sources/Brave/WebFilters/ShieldStats/Adblock/AdBlockStats.swift b/Sources/Brave/WebFilters/ShieldStats/Adblock/AdBlockStats.swift index 20c5e2b4ab9..1c6a14f4d95 100644 --- a/Sources/Brave/WebFilters/ShieldStats/Adblock/AdBlockStats.swift +++ b/Sources/Brave/WebFilters/ShieldStats/Adblock/AdBlockStats.swift @@ -13,9 +13,11 @@ import os.log public actor AdBlockStats { /// The max number of enabled filter lists depending on the amount memory available to the device static var maxNumberOfAllowedFilterLists: Int = { - let memory = Int(ProcessInfo.processInfo.physicalMemory / 1073741824) - ContentBlockerManager.log.debug("Memory: \(memory)") - return max(min(5 * memory, 40), 20) + let numberOfGigs = Int(ProcessInfo.processInfo.physicalMemory / 1073741824) + ContentBlockerManager.log.debug("Memory: \(numberOfGigs)") + // Take a value between 20 and 40, + // with the real value somewhere in the middle depending on the device's memory + return max(min(5 * numberOfGigs, 40), 20) }() typealias CosmeticFilterModelTuple = (isAlwaysAggressive: Bool, model: CosmeticFilterModel)