Skip to content

flutter_gallery's frame build time is super slow on iPhone6S (and possibly other newer iPhones too) #30625

Closed

Description

@liyuqian

Running flutter drive -t test_driver/transitions_perf.dart inside flutter_gallery gets the following build time benchmarks:

  "average_frame_build_time_millis": 22.62587272727273,
  "90th_percentile_frame_build_time_millis": 31.072,
  "99th_percentile_frame_build_time_millis": 226.192,
  "worst_frame_build_time_millis": 367.374,
  "missed_frame_build_budget_count": 53,
  "average_frame_rasterizer_time_millis": 4.706748858447491,
  "90th_percentile_frame_rasterizer_time_millis": 12.663,
  "99th_percentile_frame_rasterizer_time_millis": 13.571,
  "worst_frame_rasterizer_time_millis": 15.494,
  "missed_frame_rasterizer_budget_count": 0,

which is much slower than the iPhone4S and iPhone6 in our device lab. For example:

                            | iPhone4S  | iPhone6   | iPhone6S
average frame build time    | 5.76ms    | 2.6ms     | 22.6ms

The slow build time seems to only happen during the first animation (which is what our driver test is measuring).

This issue was found because of a customer complaint in #28113 (comment) . According to that, this seems to also happen on newer iPhones such as iPhone X.

Actions to be taken:

  1. Test this on other newer iPhones such as iPhoneX to see how wide this issue is.
  2. Add iPhone6S or newer iPhones to our device lab. (Maybe create a separate issue to track this.)
  3. Add more tracings to our UI thread frame build process to figure out why it's slow.

Activity

  1. changed the title [-]flutter_gallery's frame build time is super slow on iPhone6S (and possibly all newer iPhones than iPhone6)[/-] [+]flutter_gallery's frame build time is super slow on iPhone6S (and possibly other newer iPhones than iPhone6)[/+] on Apr 6, 2019
  2. changed the title [-]flutter_gallery's frame build time is super slow on iPhone6S (and possibly other newer iPhones than iPhone6)[/-] [+]flutter_gallery's frame build time is super slow on iPhone6S (and possibly other newer iPhones too)[/+] on Apr 6, 2019
  3. liyuqian commented on Apr 6, 2019

    @liyuqian
    ContributorAuthor

    CC @cbracken @dnfield @digiter for adding iPhone6S or newer iPhones.

  4. liyuqian commented on Apr 6, 2019

    @liyuqian
    ContributorAuthor

    Nevermind, I forgot to add --profile to flutter drive so it's in debug mode... Close this issue.

  5. dnfield commented on Apr 6, 2019

    @dnfield
    Contributor

    Well don't leave us hanging - what are the times in profile mode? 😃

  6. liyuqian commented on Apr 7, 2019

    @liyuqian
    ContributorAuthor

    @dnfield : I just found another issue: the driver test isn't showing any image resources (#30641). That's probably why our driver test is so fast while in practice the app is much slower on first animation build. BTW, here's the profile-mode driver test's benchmark (without showing any images).

      "average_frame_build_time_millis": 2.204256756756756,
      "90th_percentile_frame_build_time_millis": 2.981,
      "99th_percentile_frame_build_time_millis": 12.02,
      "worst_frame_build_time_millis": 23.595,
    
  7. github-actions commented on Aug 30, 2021

    @github-actions

    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.

  8. locked as resolved and limited conversation to collaborators on Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: performanceRelates to speed or footprint issues (see "perf:" labels)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions