perf: convert 194 interpolated Log.d() calls to lambda overloads

Defers string construction until after the level check, avoiding
allocation when debug logging is filtered in release/benchmark builds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
davotoula
2026-03-28 16:21:39 +01:00
parent 541b197a64
commit 3b81731771
78 changed files with 205 additions and 214 deletions
@@ -60,7 +60,7 @@ class OkHttpBitcoinExplorer(
return client.newCall(request).execute().use {
if (it.isSuccessful) {
Log.d("OkHttpBlockstreamExplorer", "$baseAPI/block/$hash")
Log.d("OkHttpBlockstreamExplorer") { "$baseAPI/block/$hash" }
val jsonObject = JacksonMapper.mapper.readTree(it.body.string())
@@ -104,7 +104,7 @@ class OkHttpBitcoinExplorer(
if (it.isSuccessful) {
val blockHash = it.body.string()
Log.d("OkHttpBlockstreamExplorer", "$url $blockHash")
Log.d("OkHttpBlockstreamExplorer") { "$url $blockHash" }
cache.putHeight(height, blockHash)
blockHash