Skip to content

My app is slow or missing frames (metabug) #74833

Closed

Description

@Hixie

This is a meta-issue to track reproducible reports of jank in Flutter apps.

If you are experiencing jank in your app:

  1. Try to reproduce the problem in a test app. Either run flutter create janktest and recreate the situation you are experiencing in that app, or clone your app and delete code until you have the jank reproducing with a single .dart file.

  2. File a bug and include your .dart file demonstrating the problem. If you need more than just a .dart file (for example, assets are needed to reproduce the issue, or plugins/packages are needed to reproduce the issue) then create a GitHub repository and upload the app there.
    Make sure to include the flutter doctor -v output and any logs from flutter run and flutter analyze.

  3. Switch flutter to master channel and run this app on a physical device using profile mode with Skia tracing enabled, as follows:
    flutter channel master
    flutter run --profile --trace-skia

    The bleeding edge master channel is encouraged here because Flutter is constantly fixing bugs and improving its performance. Your problem in an older Flutter version may have already been solved in the master channel.

  4. Record a video of the performance issue using another phone so we can have an intuitive understanding of what happened. Don’t use "adb screenrecord", as that affects the performance of the profile run. Attach the video to your bug.

  5. Open Observatory and save a timeline trace of the performance issue so we know which functions might be causing it. See "How to Collect and Read Timeline Traces" on this blog post:
    https://medium.com/flutter/profiling-flutter-applications-using-the-timeline-a1a434964af3#a499
    Make sure that the performance overlay is turned OFF while recording the trace.
    Attach the JSON file containing your trace to your bug. You may also wish to include a screenshot of the part of the trace showing the problem you are seeing, just so that people can see at a glance what kind of performance issue the bug is about.

  6. Mention this bug in your bug, so that GitHub includes a link to it here.

Please avoid commenting on this bug. Keep each issue separate so that we can examine each specific problem individually. Having one issue that contains comments about multiple problems make the issue intractable.

Activity

  1. added
    c: performanceRelates to speed or footprint issues (see "perf:" labels)
    perf: speedPerformance issues related to (mostly rendering) speed
    on Jan 27, 2021
  2. locked as too heated and limited conversation to collaborators on Jan 27, 2021
  3. goderbauer commented on Jan 28, 2021

    @goderbauer
    Member

    May be worthwhile to note that the performance overlay from step 3 should be turned off again when recording the trace in observatory in step 5 as that messes with performance.

  4. dnfield commented on Jan 29, 2021

    @dnfield
    Contributor

    The performance overlay is probably not the best thing to recommend here - it actually does incur some performance overhead itself, and on some GPUs it's notable how much. It'd be best to just run the tracing and read that.

  5. added
    engineflutter/engine related. See also e: labels.
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Feb 8, 2021
  6. kf6gpe commented on Feb 8, 2021

    @kf6gpe
    Contributor

    Triage: Adding team labels so this doesn't come up on the "untriaged" report.

  7. Hixie commented on Jun 9, 2022

    @Hixie
    ContributorAuthor

    Since we created the performance issue template in issue creation, this hasn't ended up finding any use, so I'm going to close it.

  8. maheshj01 commented on Aug 18, 2022

    @maheshj01
    Member

    This meta issue has been so useful for the triage team.

  9. Hixie commented on Aug 18, 2022

    @Hixie
    ContributorAuthor

    @maheshmnj good to hear! in what way?

  10. maheshj01 commented on Aug 19, 2022

    @maheshj01
    Member

    It has helped us when triaging performance issues to attach the timeline trace with the triage response and it also acts as a nice guide to point to authors of the issue and everyone else.

    Some sample comments where it has helped us

    #104709 (comment)

    #87811 (comment) (I got to know about this issue here)

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)engineflutter/engine related. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.perf: speedPerformance issues related to (mostly rendering) speed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions