Skip to content

Notifcation API is expensive #97849

Closed

Description

@jonahwilliams

From some early investigation, several of the scroll notification events have no listeners if there is no scroll bar, which leads to 500/1000 element traversals and 2x-3x as many typechecks per frame on gallery Shrine/ mobile.

Will fill in more details later

Activity

  1. jonahwilliams commented on Feb 14, 2022

    @jonahwilliams
    ContributorAuthor

    Even if we don't traverse the entire element tree, this still ends up quite expensive when scrolling. Consider the following chrome profile from devtools where we're spending ~30% CPU on notifications.

    @kenzieschmoll @goderbauer

    image

  2. changed the title [-]Notifcation API will traverse entire Element tree if there are no listeners[/-] [+]Notifcation API is expensive[/+] on Feb 14, 2022
  3. jonahwilliams commented on Feb 14, 2022

    @jonahwilliams
    ContributorAuthor

    Design doc in progress

  4. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    f: scrollingViewports, list views, slivers, etc.
    and removed on Feb 22, 2022
  5. added
    P2Important issues not at the top of the work list
    on Feb 23, 2022
  6. github-actions commented on Mar 15, 2022

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

  7. locked as resolved and limited conversation to collaborators on Mar 15, 2022
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

    P2Important issues not at the top of the work listc: performanceRelates to speed or footprint issues (see "perf:" labels)f: scrollingViewports, list views, slivers, etc.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