From bfc920ca042e2c0727889ee492fa8937a94ae4ad Mon Sep 17 00:00:00 2001 From: davotoula Date: Sat, 13 Sep 2025 21:09:27 +0200 Subject: [PATCH] Added logging of image gallery computation time --- .../vitorpamplona/amethyst/ui/components/RichTextViewer.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/components/RichTextViewer.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/components/RichTextViewer.kt index a8540377a..617149b5d 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/components/RichTextViewer.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/components/RichTextViewer.kt @@ -20,6 +20,7 @@ */ package com.vitorpamplona.amethyst.ui.components +import android.util.Log import androidx.compose.foundation.border import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement @@ -560,6 +561,8 @@ private fun RenderWordsWithImageGallery( words: ImmutableList, context: RenderContext, ) { + val startTime = System.currentTimeMillis() + var i = 0 val n = words.size @@ -606,6 +609,8 @@ private fun RenderWordsWithImageGallery( i++ } } + + Log.d("RichTextViewer", "RenderWordsWithImageGallery took ${System.currentTimeMillis() - startTime}ms for ${words.size} segments") } @Composable