Skip to content

Flutter startup first frame seems to be pre-empted by a Dart_NotifyIdle garbage collect #71253

@xster

Description

@xster

Comparing a launch trace vs last year, noticed that on the UI thread, the very first thing we do when launching a Flutter instance seems to open up with a garbage collect rather than drawing the first frame.

See screenshot for stack:

Screen Shot 2020-11-25 at 10 23 38 PM

Next CPU sample:
Screen Shot 2020-11-25 at 10 24 01 PM

Next sample:
Screen Shot 2020-11-25 at 10 24 16 PM

The sampling is every 1ms but it seems like the first 20ms were spent garbage collecting. @dnfield may have recent context. Could we add some special casing to not do an Engine::NotifyIdle until the first frame is drawn?

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority issues at the top of the work listc: performanceRelates to speed or footprint issues (see "perf:" labels)c: regressionIt was better in the past than it is nowengineflutter/engine related. See also e: labels.perf: speedPerformance issues related to (mostly rendering) speedteam-engineOwned by Engine team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions