Skip to content

Commit

Permalink
Only create activities during debug (TextureGroup#1456)
Browse files Browse the repository at this point in the history
  • Loading branch information
Adlai-Holler authored Apr 16, 2019
1 parent e56ea14 commit f48d778
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Source/Base/ASLog.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,11 @@ AS_EXTERN os_log_t ASLockingLog(void);
* reflected in the log whereas activities described by the newer
* os_activity_scope are. So unfortunately we must use these iOS 10
* APIs to get meaningful logging data.
*
* NOTE: Creating and tearing down activities require inter-process communication and can
* take dozens of microseconds on an A8. We do it quite often. Enable activities only during debugging.
*/
#if OS_LOG_TARGET_HAS_10_12_FEATURES
#if DEBUG && OS_LOG_TARGET_HAS_10_12_FEATURES

#define OS_ACTIVITY_NULLABLE nullable
#define AS_ACTIVITY_CURRENT OS_ACTIVITY_CURRENT
Expand Down

0 comments on commit f48d778

Please sign in to comment.