You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Jittering on Flutter Apps (iOS) when switched #28113
When switching between apps (or launching the app), animations are jittering at the beginning - in particular, when scrolling through lists. I didn't test it on other devices. Experienced it both with the inKino app (made by a Googler) and my own app. Same is true on startup. Any idea on that?
@msw333 : Sorry for the waiting. I got distracted by some other issues. Here's what I've found so far:
As Jittering on Flutter Apps (iOS) when switched #28113 (comment) mentioned, the 300ms gap I found earlier is actually because that I'm not touching the screen. Hence it's not a jank. I mistakenly thought it was a jank because our performance overlay seems to have a one-frame latency (i.e., the last blue bar is actually the second-last frame, not the last frame).
I did some tests again on iPhon6S with the performance overlay turned on. However, it seems that most of the times, there's no jank at all after switching: https://photos.app.goo.gl/2KjRRewZsFHYhgzM6
Sometimes I do see a big jank (~100ms) but that seems to have nothing to do with switching or starting the app. It usually happens after many scrollings, and it can be reproduced without switching the app. See dart-timeline-2019-3-5.json.zip at about 309 seconds. I'm not sure if it's the same issue here. Nevertheless it's something that we need to fix (probably by creating a new issue).
As those findings didn't help much in fixing this, can you please help us get a little more information:
Run your reproduction app (in Shader warm up #27660 (comment)) using the master branch tip-of-the-tree Flutter in profile mode.
Turn on performance overlay (by pressing 'P' on your flutter run --profile command line) so we can know exactly which thread is causing the jank.
Reproduce the jank after switching, and post the video and the trace here.
I understand your frustration as it's still not fixed. I also desperately want to fix it and I'm frustrated too when I can't reproduce it and find something useful on my iPhone6S. Hopefully that we can learn something useful soon after your new video and trace.
Issue is highly increased when having a more complex logic. In my chat app, which is using Streambuilder with Listview.builder, CachedNetworkImage + Firestore etc... in a tab view, I saw currently no other solution: I am displaying a 3sec ‚loading splashscreen‘ with a timer. After that, it is completely smooth. Issue is highly present on first startup + app switching on my iPhone X.
App is 50+ dart files, so I cannot easily put a reproducible code together...but I can assure that the reproducible code I was providing only shows a minimal effect. Really hope that i-schuetz‘s input is helping.
@i-schuetz : ignore #30625, I forgot --profile. Nevertheless, both your trace and my profile trace show problems in UI thread with frame build time. So I'm going to have a deeper look into that.
I found that the image is only costing less than 5ms so it's not the biggest problem. The font loading is costing more than 50ms:
I'm adding traces for that: flutter-team-archive/engine#8477 . Once that engine PR is in the framework, you can also test your app to see if font loading is the culprit.
If that's the case, this would be a duplicate of #19350 .
We'll discuss and figure out a plan to solve it on Monday when the font experts come back.
@yunyu : Thank you very much for your example app! I did reproduced the stutter on an iPhone X, and it didn't stutter on an iPhone 6S. Given that it only happened on iPhone X, let's continue the discussion in #31086 (comment)
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
cybernik commentedon Feb 18, 2019
i have the same problem too on iphone X (12.2)
zoechi commentedon Feb 19, 2019
Please add the output of
flutter doctor -v.Is this with debug or release builds?
zoechi commentedon Feb 19, 2019
Possible duplicate of #813
msw333 commentedon Feb 19, 2019
release build:
zoechi commentedon Feb 19, 2019
Is this with debug or release builds?
msw333 commentedon Feb 19, 2019
release builds
zoechi commentedon Feb 19, 2019
Did you test on a real device or only on the simulator?
14 remaining items
msw333 commentedon Apr 4, 2019
@liyuqian, you have any news for us? Desperately waiting.
liyuqian commentedon Apr 5, 2019
@msw333 : Sorry for the waiting. I got distracted by some other issues. Here's what I've found so far:
As Jittering on Flutter Apps (iOS) when switched #28113 (comment) mentioned, the 300ms gap I found earlier is actually because that I'm not touching the screen. Hence it's not a jank. I mistakenly thought it was a jank because our performance overlay seems to have a one-frame latency (i.e., the last blue bar is actually the second-last frame, not the last frame).
I did some tests again on iPhon6S with the performance overlay turned on. However, it seems that most of the times, there's no jank at all after switching: https://photos.app.goo.gl/2KjRRewZsFHYhgzM6
Sometimes I do see a big jank (~100ms) but that seems to have nothing to do with switching or starting the app. It usually happens after many scrollings, and it can be reproduced without switching the app. See
dart-timeline-2019-3-5.json.zip at about 309 seconds. I'm not sure if it's the same issue here. Nevertheless it's something that we need to fix (probably by creating a new issue).
As those findings didn't help much in fixing this, can you please help us get a little more information:
flutter run --profilecommand line) so we can know exactly which thread is causing the jank.I understand your frustration as it's still not fixed. I also desperately want to fix it and I'm frustrated too when I can't reproduce it and find something useful on my iPhone6S. Hopefully that we can learn something useful soon after your new video and trace.
ivnsch commentedon Apr 6, 2019
@liyuqian What about the gallery issues?
liyuqian commentedon Apr 6, 2019
@i-schuetz: I just filed #30625. The issue that you reported seems to be a big one. We're working on it.
msw333 commentedon Apr 6, 2019
Issue is highly increased when having a more complex logic. In my chat app, which is using Streambuilder with Listview.builder, CachedNetworkImage + Firestore etc... in a tab view, I saw currently no other solution: I am displaying a 3sec ‚loading splashscreen‘ with a timer. After that, it is completely smooth. Issue is highly present on first startup + app switching on my iPhone X.
App is 50+ dart files, so I cannot easily put a reproducible code together...but I can assure that the reproducible code I was providing only shows a minimal effect. Really hope that i-schuetz‘s input is helping.
liyuqian commentedon Apr 6, 2019
@i-schuetz : ignore #30625, I forgot
--profile. Nevertheless, both your trace and my profile trace show problems in UI thread with frame build time. So I'm going to have a deeper look into that.ivnsch commentedon Apr 7, 2019
@liyuqian Great! I join @msw333 in hoping that there will be a fix soon. At the moment I'm unable to recommend Flutter to clients, because of this.
liyuqian commentedon Apr 7, 2019
I found that the image is only costing less than 5ms so it's not the biggest problem. The font loading is costing more than 50ms:
I'm adding traces for that: flutter-team-archive/engine#8477 . Once that engine PR is in the framework, you can also test your app to see if font loading is the culprit.
If that's the case, this would be a duplicate of #19350 .
We'll discuss and figure out a plan to solve it on Monday when the font experts come back.
yunyu commentedon Apr 25, 2019
Here is a single file test app which exhibits this issue more clearly: https://github.com/yunyu/flutter_scroll_stutter_test/blob/master/lib/main.dart
It consists of a feed containing images with a text overlay and a basic parallax effect.
liyuqian commentedon Apr 29, 2019
@yunyu : Thank you very much for your example app! I did reproduced the stutter on an iPhone X, and it didn't stutter on an iPhone 6S. Given that it only happened on iPhone X, let's continue the discussion in #31086 (comment)
luckysmg commentedon Jul 7, 2019
My iPhoneX has the same problem!! It is very apparent when launching the apps or switching apps from background to foreground——the frames drop...
liyuqian commentedon Aug 7, 2019
Close this as this issue is a duplicate to
github-actions commentedon Aug 14, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.