Does anyone experience semi-random hangups of a fe...
# compose-ios
r
Does anyone experience semi-random hangups of a few seconds when a certain composable enters composition? I think it has to do with an
Image
with a compose.materialIconsExtended ImageVector (specifically`Icons.Filled.PhotoAlbum` which is nothing too complicated in terms of its path). It happens on my physical iPhone 14 Pro and simulators, but typically on a fresh install, afterwards not anymore. Does not happen on Android or desktop.
Sample composable:
Copy code
Image(
    modifier = Modifier.fillMaxSize().clickable {
        dropdownState.open()
    },
    imageVector = Icons.Filled.PhotoAlbum,
    colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onPrimaryContainer),
    contentDescription = "Image",
)
I have a button that toggles it coming in and out of the composition. When the button is clicked, the app hangs for 1+ seconds.
m
Yes! But i experience them more so on Android, on my iPhone 14 Pro Max it’s fine. But on Android, if i use image bitmaps in a composable, it’s quite laggy. I thought about caching and preloading them in the future, because the drawing cannot be expensive, only the loading can be
😮 1
Tried today with larger SVGs, on iOS they load instantly, on Android takes a second.
r
On Android I didn't notice it but typically issues like these went away with R8 obfuscation. But on iOS I didn't try an archive build yet (need a dev account).
m
@Rok Oblak what do you mean with R8, which settings would i need to tweak so SVG/xml vectors are loaded quicker on Android? If you sent a github link or so, i could try an archived build on my iphone..
r
by R8 I mean to produce a minified release build (or use minifyEnabled=true on the debug build) it typically makes the app run fast and stutter-free even on a midrange phone