I am having an issue with the Kotlin GC taking an ...
# kotlin-native
t
I am having an issue with the Kotlin GC taking an excessive amount of time on iOS, hanging the app. I am using Ktor, Compose MP and have a lot of objects flying around the system. See thread for an Intruments example.
You see it hangs up at 200% CPU for 18(!) seconds.
For this reason, I added this to my gradle.properties:
Copy code
kotlin.native.binary.objcDisposeOnMain = false
which fixes that, but according to others, that may cause leaks with iOS resources. And I do see over time that the app runs out of memory, starts lagging and then will eventually quit.
Are there any other solutions, like an alternate GC implementation???
Please help! We are hoping to get this new version out by the end of month, and would like the iOS experience to be as smooth as Android. Thanks!
I did change to the mimalloc version with this flag:
Copy code
kotlin.native.binary.mimallocUseCompaction = true
added. And it does seem a little better overall. But I expect we will continue to have leaks since I still have the objcDisposeOnMain set to false.