From ecdb1b2b710e30315c1d77ccbea961db64287c00 Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Fri, 5 Aug 2016 13:58:05 -0400 Subject: Make GTMLogLevelFilter use KVO on GTMVerboseLogging in sharedUserDefaults This avoids checking if verbose logging is enabled on every user defaults change, and only does so when the verbose logging key changes. In sampling a few apps, this showed up as a hit when the app changes default (directly or via the System frameworks storing things). By using KVO for it it basically disappears from the samples. --- Foundation/GTMLogger.h | 1 + 1 file changed, 1 insertion(+) (limited to 'Foundation/GTMLogger.h') diff --git a/Foundation/GTMLogger.h b/Foundation/GTMLogger.h index a776922..16f0eaf 100644 --- a/Foundation/GTMLogger.h +++ b/Foundation/GTMLogger.h @@ -457,6 +457,7 @@ typedef enum { @interface GTMLogLevelFilter : NSObject { @private BOOL verboseLoggingEnabled_; + NSUserDefaults *userDefaults_; } @end // GTMLogLevelFilter -- cgit v1.2.3