useBatchedLogging property

bool useBatchedLogging
getter/setter pair

Use batched logging to reduce main thread blocking When true, logs are accumulated and flushed in batches asynchronously This significantly improves performance in high-frequency logging scenarios (200+ logs/sec)

Defaults to true in debug mode for better UI responsiveness Set to false if you need real-time console output or debugging crashes

Performance impact: 70-80% reduction in main thread blocking

Note: In case of app crash, up to batchSize logs may be lost Use forceFlush() in critical sections if needed

Implementation

static bool useBatchedLogging = kDebugMode;