Skip to content

Conversation

@stuartmorgan-g
Copy link
Contributor

generateDartPluginRegistry was being set to true unconditionally in
ResidentRunner, bypassing the primary check in
DartPluginRegistrantTarget, and the targetPlatform was not set in that
codepath, bypassing the second after the changes in
#87991. This caused web hot
restarts to be slower due to doing unnecessary work.

This ensures that generateDartPluginRegistry is false in the
ResidentWebRunner to skip that unnecessary step.

Fixes #91262

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

generateDartPluginRegistry was being set to true unconditionally in
ResidentRunner, bypassing the primary check in
DartPluginRegistrantTarget, and the targetPlatform was not set in that
codepath, bypassing the second after the changes in
flutter#87991. This caused web hot
restarts to be slower due to doing unnecessary work.

This ensures that generateDartPluginRegistry is false in the
ResidentWebRunner to skip that unnecessary step.

Fixes flutter#91262
@stuartmorgan-g stuartmorgan-g requested a review from blasten October 5, 2021 02:29
@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Oct 5, 2021
@google-cla google-cla bot added the cla: yes label Oct 5, 2021
@stuartmorgan-g
Copy link
Contributor Author

/cc @zanderso @christopherfujino FYI. I'm not sure how to run the perf test myself, but I verified locally that the undesired codepath was being run for web hot restart without this change, as is not with this change.

@zanderso
Copy link
Member

zanderso commented Oct 5, 2021

/cc @zanderso @christopherfujino FYI. I'm not sure how to run the perf test myself, but I verified locally that the undesired codepath was being run for web hot restart without this change, as is not with this change.

I don't know of an easier way of seeing how to run the benchmarks than looking at how the bots run them. In this case you can search on the dashboard for "chrome_dev_mode", which leads you to and example run:

https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20macos_chrome_dev_mode/2408/overview

From there, you probably just need to look at step 17 "run macos_chrome_dev_mode".

Copy link
Member

@zanderso zanderso left a comment

Choose a reason for hiding this comment

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

lgtm w/ nit

Co-authored-by: Zachary Anderson <[email protected]>
@zanderso
Copy link
Member

zanderso commented Oct 5, 2021

@godofredoc the ci.yaml validation looks like it is taking too long to queue on this PR.

@godofredoc
Copy link
Contributor

@godofredoc the ci.yaml validation looks like it is taking too long to queue on this PR.
This is a problem with the request to trigger the builds timing out. Retried all builds.

@skia-gold
Copy link

Gold has detected about 1 new digest(s) on patchset 2.
View them at https://flutter-gold.skia.org/cl/github/91281

@fluttergithubbot
Copy link
Contributor

This pull request is not suitable for automatic merging in its current state.

@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #91281 at sha 71595f5

@flutter-dashboard flutter-dashboard bot added the will affect goldens Changes to golden files label Oct 5, 2021
@zanderso
Copy link
Member

zanderso commented Oct 5, 2021

Any idea why this change affects goldens?

@blasten
Copy link

blasten commented Oct 5, 2021

That is weird. maybe a rebase fixes it?

@stuartmorgan-g
Copy link
Contributor Author

That is weird. maybe a rebase fixes it?

Yep! No idea what happened there; infra issue maybe?

@blasten
Copy link

blasten commented Oct 5, 2021

I think Skia Gold's state is not a function of the files in your local copy. It's a function of whomever approved the last gold files?

@zanderso zanderso merged commit 64fd68e into flutter:master Oct 5, 2021
@stuartmorgan-g stuartmorgan-g deleted the disable-plugin-registry-web-resident-runner branch October 5, 2021 19:30
clocksmith pushed a commit to clocksmith/flutter that referenced this pull request Oct 29, 2021
* Don't generate plugin registry in ResidentWebRunner

generateDartPluginRegistry was being set to true unconditionally in
ResidentRunner, bypassing the primary check in
DartPluginRegistrantTarget, and the targetPlatform was not set in that
codepath, bypassing the second after the changes in
flutter#87991. This caused web hot
restarts to be slower due to doing unnecessary work.

This ensures that generateDartPluginRegistry is false in the
ResidentWebRunner to skip that unnecessary step.

Fixes flutter#91262

* Formatting

Co-authored-by: Zachary Anderson <[email protected]>

Co-authored-by: Zachary Anderson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression in restart time benchmarks

7 participants