Closed Shvet closed 9 months ago
I'm not familiar enough with the android view model lifecycle, but as stated in the documentation, you need to make sure that the encoding registry is only instatiated once and then reused afterwards.
See my comment here: https://github.com/knuddelsgmbh/jtokkit/issues/50
closing due to inactivity
After adding this library in jetpack compose, Whenever i open composable it will produce GC,
Background concurrent copying GC freed 614707(17MB) AllocSpace objects, 1(20KB) LOS objects, 46% free, 27MB/51MB, paused 465us,83us total 110.453ms
NativeAlloc concurrent copying GC freed 664947(19MB) AllocSpace objects, 2(88KB) LOS objects, 41% free, 34MB/58MB, paused 533us,84us total 158.531ms
NativeAlloc concurrent copying GC freed 725339(19MB) AllocSpace objects, 1(68KB) LOS objects, 39% free, 37MB/61MB, paused 697us,89us total 150.254ms
I have Registry and encoding code in
ViewModel
.