Skip to content

Only schedule mouse tracking callback when there is a mouse#46113

Merged
fluttergithubbot merged 1 commit intoflutter:masterfrom
dkwingsmt:mouse-callback-check-mouse
Dec 5, 2019
Merged

Only schedule mouse tracking callback when there is a mouse#46113
fluttergithubbot merged 1 commit intoflutter:masterfrom
dkwingsmt:mouse-callback-check-mouse

Conversation

@dkwingsmt
Copy link
Copy Markdown
Contributor

@dkwingsmt dkwingsmt commented Dec 4, 2019

Description

PR #44631 introduces a post-frame check that is scheduled after every frame, which affected some benchmarks (namely stock_layout_iteration).

After this PR, the post-frame check is only scheduled when there is a mouse connected, which hopefully improves the performance. (Through my local testing there is ~1% improvement)

Related Issues

Tests

I added the following tests:

  • should not schedule postframe callbacks when no mouse is connected

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read Handling breaking changes.

  • No, no existing tests failed, so this is not a breaking change.

@fluttergithubbot fluttergithubbot added the framework flutter/packages/flutter repository. See also f: labels. label Dec 4, 2019
Copy link
Copy Markdown
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

@dkwingsmt dkwingsmt added waiting for tree to go green a: desktop Running on desktop f: gestures flutter/packages/flutter/gestures repository. labels Dec 5, 2019
@fluttergithubbot fluttergithubbot merged commit f8027a7 into flutter:master Dec 5, 2019
@dkwingsmt dkwingsmt deleted the mouse-callback-check-mouse branch May 18, 2020 20:42
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

a: desktop Running on desktop f: gestures flutter/packages/flutter/gestures repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants