`log.isXXXEnabled()` causes allocation overhead
Closed this issue · 1 comments
kamilkloch commented
log.isDebugEnabled()
causes a lot of unnecessary allocations, going through
override def predicate(level: Level): CorePredicate =
new CorePredicate.Impl(level, this)
in CoreLogger.Abstract
Arguably, this operation should be as lightweight as possible.
wsargent commented
It's assigned to a val.
Please see https://tersesystems.github.io/blindsight/performance/memory.html and https://tersesystems.github.io/blindsight/performance/benchmarks.html and I also wrote a couple of blog posts: