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:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user