moko-resources
moko-resources copied to clipboard
painterResource is too slow on iOS
The MOKO resources version of painterResource is much slower than its JetBrains counterpart. For example,
LazyVerticalGrid {
repeat(100) {
item {
// Too slow, the app freezes as the screen is scrolled
Image(painterResource(MR.images.someImage))
// Ok
Image(painterResource("MR/images/[email protected]"))
}
}
}
It seems like retrieving images through UIImage, CGImage, and Skia Image conversions is too slow; why don't we just use the same strategy as in the JVM version (although the resource API is experimental)?
For those who have the same problem, we modified MOKO resources as follows, and it works well. https://github.com/clebrain/moko-resources/blob/2cedf849eadd4be7f86ff7fa4ba2d6606bf15aa9/resources-compose/src/iosMain/kotlin/dev/icerock/moko/resources/compose/ImageResource.kt#L22-L59
Hi @Alex009 is this has been released? I am also facing a similar issue on iOS.
@DasJhaman no. it's planned in 0.24.0
@Alex009 Could you please provide an estimated timeframe for the release of version 0.24.0?
@Alex009 Could you please provide an estimated timeframe for the release of version 0.24.0?
fixed in 0.24.0-beta-1