-
Notifications
You must be signed in to change notification settings - Fork 26.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jittering on Flutter Apps (iOS) when switched #28113
Comments
i have the same problem too on iphone X (12.2) |
Please add the output of Is this with debug or release builds? |
Possible duplicate of #813 |
release build:
|
Is this with debug or release builds? |
release builds |
Did you test on a real device or only on the simulator? |
Real device. iPhone X, see video https://youtu.be/1mdM_Uv574w - issue is very noticeable and observable for my app as well as for the app inKino (made by a Googler). So it does not seem to be an issue in my code. |
Right, I only looked at the
I don't think so. #813 is also still open. |
Ok. Well, it is an issue which makes awesome and butterly smooth Flutter apps not as shiny as they could be. Initial lag is highly observable on first start as well as when switching between apps without 'waiting for 1-2 seconds'. Much worse than shown in the video... |
Also experiencing same issues with iPhone XS. |
To allow us to better help you solve this issue, can you please:
|
I did reproduce it on iPhone 6S using the code in #27660 (comment) Below is the trace of the jittering scroll right after switching the app. Around 20s, I found two things:
|
It seems that the 300ms gap could be just waiting for the user input events. So it may not be the issue. I'll reinvestigate the issue. |
Moving the last gallery comments here as it seems more appropriate than in the PR Attached the trace from opening the 4 items after closing the app. Also attached videos. As @msw333 says they don't do it justice, but still clearly noticeable. It helps watching at 0.5 or 0.25 speed. As mentioned before after closing is better, but there's still jank. In particular the 3d item it feels like it jumps directly to the open state. First launch after installation: https://youtu.be/-gTVXqrJyqo |
Thanks @i-schuetz ! Your trace on the 3rd item after closing the app is especially informative. Just to confirm:
Right? |
@liyuqian That's good to read. After launch means the first launch after installation. After close means launching the app after force-close (home button > swipe app out of the screen). Edited the post to make it clearer. |
@liyuqian, you have any news for us? Desperately waiting. |
@msw333 : Sorry for the waiting. I got distracted by some other issues. Here's what I've found so far:
As those findings didn't help much in fixing this, can you please help us get a little more information:
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. |
@liyuqian What about the gallery issues? |
@i-schuetz: I just filed #30625. The issue that you reported seems to be a big one. We're working on it. |
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 |
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/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. |
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. |
@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) |
My iPhoneX has the same problem!! It is very apparent when launching the apps or switching apps from background to foreground——the frames drop... |
Close this as this issue is a duplicate to
|
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 |
Tested on iPhone X, 12.1.4 - Flutter Stable:
(see Video)
https://youtu.be/1mdM_Uv574w
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?
The text was updated successfully, but these errors were encountered: