Skip to content

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

@liyuqian

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.

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