Skip to content

Stack filter should collapse tree walks #4174

Closed

Description

@Hixie

This kind of thing:

I/flutter : #6      MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart)
I/flutter : #7      Element.inflateWidget (package:flutter/src/widgets/framework.dart)
I/flutter : #8      Element.updateChild (package:flutter/src/widgets/framework.dart)
I/flutter : #9      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart)
I/flutter : #10     ComponentElement.mount (package:flutter/src/widgets/framework.dart)
I/flutter : #11     Element.inflateWidget (package:flutter/src/widgets/framework.dart)
I/flutter : #12     Element.updateChild (package:flutter/src/widgets/framework.dart)
I/flutter : #13     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart)
I/flutter : #14     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart)
I/flutter : #15     ComponentElement.mount (package:flutter/src/widgets/framework.dart)
I/flutter : #16     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart)
I/flutter : #17     Element.inflateWidget (package:flutter/src/widgets/framework.dart)
I/flutter : #18     Element.updateChild (package:flutter/src/widgets/framework.dart)
I/flutter : #19     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart)
I/flutter : #20     ComponentElement.mount (package:flutter/src/widgets/framework.dart)
I/flutter : #21     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart)
I/flutter : #22     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart)
I/flutter : #23     Element.inflateWidget (package:flutter/src/widgets/framework.dart)
I/flutter : #24     Element.updateChild (package:flutter/src/widgets/framework.dart)
I/flutter : #25     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart)
I/flutter : #26     ComponentElement.mount (package:flutter/src/widgets/framework.dart)
I/flutter : #27     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart)
I/flutter : #28     Element.inflateWidget (package:flutter/src/widgets/framework.dart)
I/flutter : #29     Element.updateChild (package:flutter/src/widgets/framework.dart)
I/flutter : #30     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart)
I/flutter : #31     ComponentElement.mount (package:flutter/src/widgets/framework.dart)
I/flutter : #32     Element.inflateWidget (package:flutter/src/widgets/framework.dart)
I/flutter : #33     Element.updateChild (package:flutter/src/widgets/framework.dart)
I/flutter : #34     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart)
I/flutter : #35     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart)
I/flutter : #36     ComponentElement.mount (package:flutter/src/widgets/framework.dart)
I/flutter : #37     Element.inflateWidget (package:flutter/src/widgets/framework.dart)
I/flutter : #38     Element.updateChild (package:flutter/src/widgets/framework.dart)
I/flutter : #39     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart)
I/flutter : #40     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart)
I/flutter : #41     ComponentElement.mount (package:flutter/src/widgets/framework.dart)
I/flutter : #42     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart)
I/flutter : #43     Element.inflateWidget (package:flutter/src/widgets/framework.dart)
I/flutter : #44     Element.updateChild (package:flutter/src/widgets/framework.dart)
I/flutter : #45     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart)

...isn't exactly redundant, but it'd be nice if we could output something cleaner and easier to understand. Right now we often end up with hundreds of stack frames with this kind of thing.

Activity

  1. added this to the milestone on May 24, 2016
  2. modified the milestones: , on Jan 30, 2017
  3. Hixie commented on Jan 30, 2017

    @Hixie
    ContributorAuthor

    probably to be done as part of #4021

  4. modified the milestones: 3: Current Milestone, on Oct 17, 2017
  5. Hixie commented on Jun 12, 2018

    @Hixie
    ContributorAuthor

    We could also just filter stacks in Flutter so that any sequence of stack lines that are from package:flutter or dart:* and are between two other lines that are also from package:flutter or dart:* are either omitted or replaced by an ellipsis, unless some global debugDumpFullStacksInExceptions flag is set, though that might make debugging harder, especially for us when people file bugs.

  6. self-assigned this
    on Jul 9, 2018
  7. removed their assignment
    on Jul 10, 2019
  8. removed this from the milestone on Dec 10, 2020
  9. added
    P3Issues that are less important to the Flutter project
    and removed on Jun 28, 2023
  10. Piinks commented on Apr 16, 2026

    @Piinks
    Contributor

    Closing as fixed. This issue requested a way to collapse repetitive stack frames during widget tree walks (e.g., Element.updateChild, ComponentElement.performRebuild). Flutter now includes a specialized filtering mechanism for this exact purpose.
    #49891 introduced the RepetitiveStackFrameFilter and registered it in the WidgetsBinding to automatically clean up these stack traces.

    If there is anything else to be done here, please file an updated issue. Thanks!

  11. github-actions commented on Apr 30, 2026

    @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.

  12. locked as resolved and limited conversation to collaborators on Apr 30, 2026
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

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityframeworkflutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions