Checking to see if a log level is enabled can add non-insignificant time to programs with a large number of logging statements. This issue is to track a pull request which introduces caching to the logging module so checking to see if a log level is enabled takes half the current time. Benchmark code is in the referenced pull request
Yes, though the bottleneck for normal logging is more likely in other areas so the speedup will be less noticeable. Where I notice it is with debug statements when debugging is disabled. In that scenario the bulk of the time is spent checking if the level is enabled anywhere in the ancestry.
>> Benchmark code is in the referenced pull request > Does this speed up actual logging calls such logger.info, etc? According to the benchmark in the PR, it's 50% faster when the log is ignored, like a debug call in production.