#Noticeable performance degradation Android shorebird build

1 messages · Page 1 of 1 (latest)

zealous frost
#

Hi guys, we have produced a succesful shorebird staging release build pushed it to firebase distribution. Our QA team has found that there is a noticeable performance degradation on some views that are not happening in our normal build.

I am attaching on of their findings however this is not the only one, using shorebird build seems to make some things a bit less performant, either by assets loading slower, frame rate reduction when transitioning, this is not present at all times but a some frequent moments.

QA --------
Shorebird build shows that the navigation between tabs delays a bit, and the scrolling between items looks slow. The rendering of items is bit laggy. When opening the item, the process is bit slow. The animation of item looks slow.

While the normal build shows that the navigation between tabs delays a bit; also, the scrolling improvises the responsiveness of item rendering. The rendering of items is bit smooth. When opening the item, the process is slightly responsive. The animation of item is smoothly fast.

Do you have any recommendations or thoughts on this?

#

ps: it used to be worst on the previous Shorebird versions (last tested ~2 months ago)

silent cedar
#

That's certainly very surprising. I would not expect any performance change on Android.

#

I could expect slowdowns on iOS (including previous versions), but not on Android. Android should run exactly as fast as normal flutter build.

turbid stream
zealous frost
#

Sorry for not clarifying, this is Android.

silent cedar
#

To clarify: flutter run --release works full speed, but shorebird release; shorebird preview shows the lag?

#

The only thing it could be is that we did something wrong in our management of our Dart fork, Felix. 🤷 But I'm still not sure why it would have been slower in the past. Android used to not even use a forked dart 🤣

zealous frost
#

we used release not preview, this release went to Firebase distribution which is the source for our QA to get and test builds

silent cedar
#

I wonder if somehow some other flag could have gotten thrown? e.g. turning on impeller by accident or something.

#

Would be interesting to compare a working flutter build command line with a failing shorebird release command line.

#

We definitely are happy to help debug. Performance changes on Android are definitely not expected 🙂

turbid stream
#

Yup I would double check that the exact same build is fast with flutter build but slow with shorebird release

little ravine
#

Thanks Eric and Felix - will get with @zealous frost to confirm (This is jay chang)

zealous frost
#

this is from QA example of a normal build, might be catchy but there is a difference while navigating tabs

silent cedar
silent cedar
#

The data that would be most useful for diagnosis, is understanding if the performance issues occur with a normal flutter build or not. If they do not, it would be very interesting to compare the working flutter build invocation (exact text of the command issued) to the failing shorebird release invocation.

#

Regardless, we're very interested in helping!

zealous frost
#

latest record is from a Normal build, first recording sent was from a Shorebird build

silent cedar
#

Am I correct that I'm seeing jank in the normal build?

#

(it's sometimes difficult to tell in a recording)

zealous frost
#

yes, it is indeed sort of a heavy load screen cause plenty of imgs are being downloaded

#

I understand it is a bit tricky, let's do something, let me try to dig deeper into this to prepare a less tricky comparison for you

silent cedar
#

OK, thank you. I'd love to help! Just need to better understand the ask. Sounds like there is occasional jank with flutter build , but you believe there is more pronounced jank with shorebird release correct?

zealous frost
#

exactly

#

we last tested around ~2 months ago and it was worst thats why we decided to pause at that time,

silent cedar
#

So on Android, we don't do anything that should affect performance. (On iOS we definitely do.)

#

That said, it's always possible we ahve bugs 🤷

zealous frost
#

important to say that our app its a bit complex since it runs unity in the background (which is sometimes a bit unstable) along with plenty of calls for items etc.

#

I will come back on this tomorrow with a better comparison, so we don't have false positives

silent cedar
#

So we have a fork of Dart, but almost all of our changes within that fork are guarded by #define's and turned off for Android. But it's possible that we missed one that is somehow affecting your app when under strain. Unlikely (since it's our first complaint of such) but possible.

#

We do run some Rust and start a thread in the background to do the update check. But again, shouldn't affect anything.

#

I don't think Android systems "page" memory, I think apps just crash when they run out of memory. I guess there is some chance that the (presumably minimal) additional memory we use for our rust code could be producing pressure on the app.

#

And seeing what's causing the jank? Is it the ui thread (dart code) taking too long?

#

Or something else.

#

Shorebird doesn't support profile mode, so that might be a problem. But we could make a build with profile mode.

zealous frost
#

it might be possible, because of that particular view using too much because of HD gifs and Unity, maybe the least extra effort can make a difference

silent cedar
#

It's also possible you and I can stare at it together and potentiall just make the whole thing faster 🙂