android / wear-os-samples

Multiple samples showing best practices in app and watch face development on Wear OS.
https://developer.android.com/wear
Apache License 2.0
1.12k stars 572 forks source link

Jank and poor scrolling performance on the ComposeAdvanced sample #238

Closed LouisCAD closed 2 years ago

LouisCAD commented 2 years ago

Hello,

I just tried the current latest ComposeAdvanced sample on my both watches, a TicWatch E3 and a Samsung Galaxy Watch 4, and scrolling the entire app is stuttering all-the-time:

Is it because the app has a performance bug, or is it the performance Compose offers on WearOS?

I was considering making an app with WearOS Compose, but I'm a bit worried about the fact that using my app would be the opposite of enjoyable because of such poor performance that feels all but natural.

I made a video so you can see how it is, you'll see the difference between how smoothly my finger moves, versus how the ComposeAdvanced app reacts. Here's the Google Photos link: https://photos.app.goo.gl/weBQjfUk3NG9d7zL6 (I didn't attach it directly because it's over the 100MB limit, despite being only a bit more than one minute).

Have a great day,

Louis CAD

yschimke commented 2 years ago

Are you running with a release build?

yschimke commented 2 years ago

The compose team can best answer this in compose-wear in slack. But it's known that there is a big difference for debug builds, but similar performance (views vs compose) with release builds.

If it's with a release build, then it's a bug. I have a lot more complicated wear compose apps, without any of the issues you are describing.

yschimke commented 2 years ago

To give one personal data point, I struggle to run debug builds on device, while they work fine in an emulator. But release builds work smoothly on device.

LouisCAD commented 2 years ago

I'm running it all with the debug buildType since the release buildType lacks the signing config in the sample.

What I showed is the default experience. If the performance is that poor on the device in debug mode, and if the only way around is building with minifyEnabled, maybe the default config should be edited?

yschimke commented 2 years ago

Ooops, yep, good catch.