https://kotlinlang.org logo
#compose-web
Title
# compose-web
a

Arjan van Wieringen

12/08/2023, 3:20 PM
A performance question. Looking at the Jetsnack and Imageviewer examples for WASM on https://zal.im/wasm/iv/, they are pretty janky when scrolling and resizing. Is this something that is inherently Canvas, or Compose, or something else? In other words, is that to be expected to improve or inherent in the architecture choices?
o

Oleksandr Karpovich [JB]

12/08/2023, 4:17 PM
you could try with applyBinaryen() https://github.com/Kotlin/kotlin-wasm-examples/blob/main/compose-jetsnack/web/build.gradle.kts#L37 Probably that distribution was built without it.
a

Arjan van Wieringen

12/09/2023, 2:45 PM
No, that's not it. I tried it. Looking at the performance recording it appears to be related to
CanvasBasedWindow
that reinitiates the WebGL context everytime, which seems silly to me.
o

Oleksandr Karpovich [JB]

12/11/2023, 6:24 AM
Right! That thing to be improved
Would you like to create an issue on GitHub with your findings?
8 Views