Skip to content

Remove recursion from the framework's trees #112888

@gaaclarke

Description

@gaaclarke

In local testing replacing Element.renderObject's recursive implementation with an iterative implementation was 30% faster for AOT and 97% faster for JIT on x86_64, in the case where only one object was checked. (#112885). The difference should be even more dramatic for deeper use cases.

For most code this optimization isn't important but framework's most trafficked objects should be purged of recursion: ie framework.dart and object.dart (Widget, Element, RenderObject, etc.).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: performanceRelates to speed or footprint issues (see "perf:" labels)frameworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions