Просмотр исходного кода

Change default recorder cache maximum to 25 MB

Reduce the memory impact of the tool
Ryan Olson лет назад: 11
Родитель
Сommit
09bc0377d8
2 измененных файлов с 3 добавлено и 3 удалено
  1. 1 1
      Classes/Network/FLEXNetworkRecorder.h
  2. 2 2
      Classes/Network/FLEXNetworkRecorder.m

+ 1 - 1
Classes/Network/FLEXNetworkRecorder.h

@@ -20,7 +20,7 @@ extern NSString *const kFLEXNetworkRecorderUserInfoTransactionKey;
 /// In general, it only makes sense to have one recorder for the entire application.
 + (instancetype)defaultRecorder;
 
-/// Defaults to 50 MB if never set. Values set here are presisted across launches of the app.
+/// Defaults to 25 MB if never set. Values set here are presisted across launches of the app.
 @property (nonatomic, assign) NSUInteger responseCacheByteLimit;
 
 // Accessing recorded network activity

+ 2 - 2
Classes/Network/FLEXNetworkRecorder.m

@@ -37,8 +37,8 @@ NSString *const kFLEXNetworkRecorderResponseCacheLimitDefaultsKey = @"com.flex.r
         if (responseCacheLimit) {
             [self.responseCache setTotalCostLimit:responseCacheLimit];
         } else {
-            // Default to 50 MB max. The cache will purge earlier if there is memory pressure.
-            [self.responseCache setTotalCostLimit:50 * 1024 * 1024];
+            // Default to 25 MB max. The cache will purge earlier if there is memory pressure.
+            [self.responseCache setTotalCostLimit:25 * 1024 * 1024];
         }
         self.orderedTransactions = [NSMutableArray array];
         self.networkTransactionsForRequestIdentifiers = [NSMutableDictionary dictionary];