-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Reduce app startup latency by initializing the engine on a separate thread #166918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce app startup latency by initializing the engine on a separate thread #166918
Conversation
jonahwilliams
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
| } else if (merged_platform_ui == "disabled") { | ||
| settings.merged_platform_ui_thread = | ||
| Settings::MergedPlatformUIThread::kDisabled; | ||
| } else if (merged_platform_ui == "mergeAfterLaunch") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why a separate option? This should be a strict improvement on all platforms. So, perhaps we should always merge after launch when the "enabled". This avoids adding an additional flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This option requires support from the embedder which has not been implemented on all host platforms.
If kMergeAfterLaunch is selected, then the embedder needs to configure the thread host to create a UI thread (which will only be used during engine startup). Some embedders may only have a platform thread and thus will not support this mode.
|
Like we spoke about, my main concern remains the potential race that could happen between when the engine is setup, the isolate is launched, the merging happens, and when the main entrypoint is invoked. Not because the entrypoint cannot be invoked on a background thread, but the risk of any Dart invocation making an FFI call with the assumption that is on the main thread. Maybe this race isn't happening but I am not able to convince myself that it cant. Perhaps add an FML_CHECK in In any case, beyond that primary concern (and perhaps the need for an additional flag), this LGTM! |
|
The Dart entrypoint is invoked on the UI thread during To avoid that race, this relies on the current design of Dart where the entrypoint starts the isolate and queues execution of the app's actual main function. The engine does the thread merge after If Dart does not do this internally, then we would need to add our own mechanism to defer execution of user code until the thread merge is done. |
…hread If settings.merged_platform_ui_thread is set to kMergeAfterLaunch, then the engine will be started on the UI thread. After engine setup completes and the Dart isolate is loaded, the UI task runner will be merged into the platform thread and all future Dart execution will run on the platform thread. This makes it possible for other work to run on the platform thread while the engine starts. This PR makes kMergeAfterLaunch the default mode in the Android embedder. See flutter#163064
511e401 to
f868f26
Compare
|
There is a deadlock when using
I experimented with a potential solution for this involving creation of a new UI task queue and task runner for each So I've updated this PR to disallow engine spawning if |
flutter/flutter@ecabb1a...3ed38e2 2025-04-18 [email protected] Update `led` docs (flutter/flutter#167380) 2025-04-18 [email protected] Throw an error if --local-engine-host is used without --local-engine (flutter/flutter#166948) 2025-04-18 [email protected] Add kotlin compatability to build file validation (flutter/flutter#167143) 2025-04-18 [email protected] Roll Skia from 844496884aa0 to 6c4595124690 (2 revisions) (flutter/flutter#167400) 2025-04-18 [email protected] Fix CarouselView crashes when initlal viewportDimension is 0.0 (flutter/flutter#167271) 2025-04-18 [email protected] Roll Dart SDK from b1eb743f97f5 to ab60afc99bcb (1 revision) (flutter/flutter#167396) 2025-04-18 [email protected] Add InputDecoration.visualDensity and InputDecorationTheme.visualDensity (flutter/flutter#166834) 2025-04-18 [email protected] Roll Skia from acc910544da7 to 844496884aa0 (1 revision) (flutter/flutter#167389) 2025-04-18 [email protected] Roll Skia from a409d685a711 to acc910544da7 (10 revisions) (flutter/flutter#167388) 2025-04-18 [email protected] Roll Dart SDK from 2bb85834e77e to b1eb743f97f5 (2 revisions) (flutter/flutter#167387) 2025-04-18 [email protected] Roll Fuchsia Linux SDK from m8Aln7fTF_8zy1V9N... to MwYckh5OvwwmIYLx0... (flutter/flutter#167385) 2025-04-17 [email protected] Roll Skia from cc2b57434651 to a409d685a711 (3 revisions) (flutter/flutter#167347) 2025-04-17 [email protected] Reduce app startup latency by initializing the engine on a separate thread (flutter/flutter#166918) 2025-04-17 [email protected] Roll Dart SDK from 992221a362ec to 2bb85834e77e (7 revisions) (flutter/flutter#167361) 2025-04-17 [email protected] Added docstring for FilterInput::GetSnapshot (flutter/flutter#167226) 2025-04-17 [email protected] adds Entity docstrings (flutter/flutter#167228) 2025-04-17 [email protected] fixed impeller golden content scale (flutter/flutter#167308) 2025-04-17 [email protected] Added docstring for FilterContents::RenderFilter (flutter/flutter#167227) 2025-04-17 [email protected] Feat: Add equality to NoDefaultCupertinoThemeData (flutter/flutter#166655) 2025-04-17 [email protected] Fix link to engine docs (flutter/flutter#167346) 2025-04-17 [email protected] [macOS] Enable merged platform and UI thread by default (flutter/flutter#166536) 2025-04-17 [email protected] [Windows] Enable merged platform and UI thread by default (flutter/flutter#163726) 2025-04-17 [email protected] Update `CHANGELOG.md` (flutter/flutter#167225) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…parate thread (flutter#166918)" This reverts commit c53fdbd. See flutter#167418
…parate thread (flutter#166918)" This includes a fix for a race seen in EmbedderTest.PlatformThreadIsolatesWithCustomPlatformTaskRunner The implementaion of MergedPlatformUIThread::kMergeAfterLaunch required changing the interface of the TaskObserverAdd/TaskObserverRemove callbacks so that TaskObserverAdd returned the TaskQueueId where the observer was added. That TaskQueueId would later be given to TaskObserverRemove. The original implementation of this PR updated the embedder library's implementation of TaskObserverAdd to return TaskQueueId::kInvalid to signal that the observer was not added. However, this conflicted with the embedder's EmbedderTaskRunner, whose implementation of GetTaskQueueId returns TaskQueueId::kInvalid as a placeholder. This PR reverts the embedder's TaskObserverAdd/TaskObserverRemove to the original implementaion which adds the observer to the current thread's message loop and does not call GetTaskQueueId. See flutter#167418
…parate thread (flutter#166918)" This includes a fix for a race seen in EmbedderTest.PlatformThreadIsolatesWithCustomPlatformTaskRunner The implementaion of MergedPlatformUIThread::kMergeAfterLaunch required changing the interface of the TaskObserverAdd/TaskObserverRemove callbacks so that TaskObserverAdd returned the TaskQueueId where the observer was added. That TaskQueueId would later be given to TaskObserverRemove. The original implementation of this PR updated the embedder library's implementation of TaskObserverAdd to return TaskQueueId::kInvalid to signal that the observer was not added. However, this conflicted with the embedder's EmbedderTaskRunner, whose implementation of GetTaskQueueId returns TaskQueueId::kInvalid as a placeholder. This PR reverts the embedder's TaskObserverAdd/TaskObserverRemove to the original implementation which adds the observer to the current thread's message loop and does not call GetTaskQueueId. See flutter#167418
…parate thread (#166918)" (#167519) This includes a fix for a race seen in EmbedderTest.PlatformThreadIsolatesWithCustomPlatformTaskRunner The implementaion of MergedPlatformUIThread::kMergeAfterLaunch required changing the interface of the TaskObserverAdd/TaskObserverRemove callbacks so that TaskObserverAdd returned the TaskQueueId where the observer was added. That TaskQueueId would later be given to TaskObserverRemove. The original implementation of this PR updated the embedder library's implementation of TaskObserverAdd to return TaskQueueId::kInvalid to signal that the observer was not added. However, this conflicted with the embedder's EmbedderTaskRunner, whose implementation of GetTaskQueueId returns TaskQueueId::kInvalid as a placeholder. This PR reverts the embedder's TaskObserverAdd/TaskObserverRemove to the original implementation which adds the observer to the current thread's message loop and does not call GetTaskQueueId. See #167418
…167472) This relands #163726 without changes. The likely reason for flakiness was #166918 (#167418 (comment)). <!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> *Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.* *List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.* *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
flutter/flutter@ecabb1a...3ed38e2 2025-04-18 [email protected] Update `led` docs (flutter/flutter#167380) 2025-04-18 [email protected] Throw an error if --local-engine-host is used without --local-engine (flutter/flutter#166948) 2025-04-18 [email protected] Add kotlin compatability to build file validation (flutter/flutter#167143) 2025-04-18 [email protected] Roll Skia from 844496884aa0 to 6c4595124690 (2 revisions) (flutter/flutter#167400) 2025-04-18 [email protected] Fix CarouselView crashes when initlal viewportDimension is 0.0 (flutter/flutter#167271) 2025-04-18 [email protected] Roll Dart SDK from b1eb743f97f5 to ab60afc99bcb (1 revision) (flutter/flutter#167396) 2025-04-18 [email protected] Add InputDecoration.visualDensity and InputDecorationTheme.visualDensity (flutter/flutter#166834) 2025-04-18 [email protected] Roll Skia from acc910544da7 to 844496884aa0 (1 revision) (flutter/flutter#167389) 2025-04-18 [email protected] Roll Skia from a409d685a711 to acc910544da7 (10 revisions) (flutter/flutter#167388) 2025-04-18 [email protected] Roll Dart SDK from 2bb85834e77e to b1eb743f97f5 (2 revisions) (flutter/flutter#167387) 2025-04-18 [email protected] Roll Fuchsia Linux SDK from m8Aln7fTF_8zy1V9N... to MwYckh5OvwwmIYLx0... (flutter/flutter#167385) 2025-04-17 [email protected] Roll Skia from cc2b57434651 to a409d685a711 (3 revisions) (flutter/flutter#167347) 2025-04-17 [email protected] Reduce app startup latency by initializing the engine on a separate thread (flutter/flutter#166918) 2025-04-17 [email protected] Roll Dart SDK from 992221a362ec to 2bb85834e77e (7 revisions) (flutter/flutter#167361) 2025-04-17 [email protected] Added docstring for FilterInput::GetSnapshot (flutter/flutter#167226) 2025-04-17 [email protected] adds Entity docstrings (flutter/flutter#167228) 2025-04-17 [email protected] fixed impeller golden content scale (flutter/flutter#167308) 2025-04-17 [email protected] Added docstring for FilterContents::RenderFilter (flutter/flutter#167227) 2025-04-17 [email protected] Feat: Add equality to NoDefaultCupertinoThemeData (flutter/flutter#166655) 2025-04-17 [email protected] Fix link to engine docs (flutter/flutter#167346) 2025-04-17 [email protected] [macOS] Enable merged platform and UI thread by default (flutter/flutter#166536) 2025-04-17 [email protected] [Windows] Enable merged platform and UI thread by default (flutter/flutter#163726) 2025-04-17 [email protected] Update `CHANGELOG.md` (flutter/flutter#167225) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…r#9114) flutter/flutter@ecabb1a...3ed38e2 2025-04-18 [email protected] Update `led` docs (flutter/flutter#167380) 2025-04-18 [email protected] Throw an error if --local-engine-host is used without --local-engine (flutter/flutter#166948) 2025-04-18 [email protected] Add kotlin compatability to build file validation (flutter/flutter#167143) 2025-04-18 [email protected] Roll Skia from 844496884aa0 to 6c4595124690 (2 revisions) (flutter/flutter#167400) 2025-04-18 [email protected] Fix CarouselView crashes when initlal viewportDimension is 0.0 (flutter/flutter#167271) 2025-04-18 [email protected] Roll Dart SDK from b1eb743f97f5 to ab60afc99bcb (1 revision) (flutter/flutter#167396) 2025-04-18 [email protected] Add InputDecoration.visualDensity and InputDecorationTheme.visualDensity (flutter/flutter#166834) 2025-04-18 [email protected] Roll Skia from acc910544da7 to 844496884aa0 (1 revision) (flutter/flutter#167389) 2025-04-18 [email protected] Roll Skia from a409d685a711 to acc910544da7 (10 revisions) (flutter/flutter#167388) 2025-04-18 [email protected] Roll Dart SDK from 2bb85834e77e to b1eb743f97f5 (2 revisions) (flutter/flutter#167387) 2025-04-18 [email protected] Roll Fuchsia Linux SDK from m8Aln7fTF_8zy1V9N... to MwYckh5OvwwmIYLx0... (flutter/flutter#167385) 2025-04-17 [email protected] Roll Skia from cc2b57434651 to a409d685a711 (3 revisions) (flutter/flutter#167347) 2025-04-17 [email protected] Reduce app startup latency by initializing the engine on a separate thread (flutter/flutter#166918) 2025-04-17 [email protected] Roll Dart SDK from 992221a362ec to 2bb85834e77e (7 revisions) (flutter/flutter#167361) 2025-04-17 [email protected] Added docstring for FilterInput::GetSnapshot (flutter/flutter#167226) 2025-04-17 [email protected] adds Entity docstrings (flutter/flutter#167228) 2025-04-17 [email protected] fixed impeller golden content scale (flutter/flutter#167308) 2025-04-17 [email protected] Added docstring for FilterContents::RenderFilter (flutter/flutter#167227) 2025-04-17 [email protected] Feat: Add equality to NoDefaultCupertinoThemeData (flutter/flutter#166655) 2025-04-17 [email protected] Fix link to engine docs (flutter/flutter#167346) 2025-04-17 [email protected] [macOS] Enable merged platform and UI thread by default (flutter/flutter#166536) 2025-04-17 [email protected] [Windows] Enable merged platform and UI thread by default (flutter/flutter#163726) 2025-04-17 [email protected] Update `CHANGELOG.md` (flutter/flutter#167225) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…r#9114) flutter/flutter@ecabb1a...3ed38e2 2025-04-18 [email protected] Update `led` docs (flutter/flutter#167380) 2025-04-18 [email protected] Throw an error if --local-engine-host is used without --local-engine (flutter/flutter#166948) 2025-04-18 [email protected] Add kotlin compatability to build file validation (flutter/flutter#167143) 2025-04-18 [email protected] Roll Skia from 844496884aa0 to 6c4595124690 (2 revisions) (flutter/flutter#167400) 2025-04-18 [email protected] Fix CarouselView crashes when initlal viewportDimension is 0.0 (flutter/flutter#167271) 2025-04-18 [email protected] Roll Dart SDK from b1eb743f97f5 to ab60afc99bcb (1 revision) (flutter/flutter#167396) 2025-04-18 [email protected] Add InputDecoration.visualDensity and InputDecorationTheme.visualDensity (flutter/flutter#166834) 2025-04-18 [email protected] Roll Skia from acc910544da7 to 844496884aa0 (1 revision) (flutter/flutter#167389) 2025-04-18 [email protected] Roll Skia from a409d685a711 to acc910544da7 (10 revisions) (flutter/flutter#167388) 2025-04-18 [email protected] Roll Dart SDK from 2bb85834e77e to b1eb743f97f5 (2 revisions) (flutter/flutter#167387) 2025-04-18 [email protected] Roll Fuchsia Linux SDK from m8Aln7fTF_8zy1V9N... to MwYckh5OvwwmIYLx0... (flutter/flutter#167385) 2025-04-17 [email protected] Roll Skia from cc2b57434651 to a409d685a711 (3 revisions) (flutter/flutter#167347) 2025-04-17 [email protected] Reduce app startup latency by initializing the engine on a separate thread (flutter/flutter#166918) 2025-04-17 [email protected] Roll Dart SDK from 992221a362ec to 2bb85834e77e (7 revisions) (flutter/flutter#167361) 2025-04-17 [email protected] Added docstring for FilterInput::GetSnapshot (flutter/flutter#167226) 2025-04-17 [email protected] adds Entity docstrings (flutter/flutter#167228) 2025-04-17 [email protected] fixed impeller golden content scale (flutter/flutter#167308) 2025-04-17 [email protected] Added docstring for FilterContents::RenderFilter (flutter/flutter#167227) 2025-04-17 [email protected] Feat: Add equality to NoDefaultCupertinoThemeData (flutter/flutter#166655) 2025-04-17 [email protected] Fix link to engine docs (flutter/flutter#167346) 2025-04-17 [email protected] [macOS] Enable merged platform and UI thread by default (flutter/flutter#166536) 2025-04-17 [email protected] [Windows] Enable merged platform and UI thread by default (flutter/flutter#163726) 2025-04-17 [email protected] Update `CHANGELOG.md` (flutter/flutter#167225) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…r#9114) flutter/flutter@ecabb1a...3ed38e2 2025-04-18 [email protected] Update `led` docs (flutter/flutter#167380) 2025-04-18 [email protected] Throw an error if --local-engine-host is used without --local-engine (flutter/flutter#166948) 2025-04-18 [email protected] Add kotlin compatability to build file validation (flutter/flutter#167143) 2025-04-18 [email protected] Roll Skia from 844496884aa0 to 6c4595124690 (2 revisions) (flutter/flutter#167400) 2025-04-18 [email protected] Fix CarouselView crashes when initlal viewportDimension is 0.0 (flutter/flutter#167271) 2025-04-18 [email protected] Roll Dart SDK from b1eb743f97f5 to ab60afc99bcb (1 revision) (flutter/flutter#167396) 2025-04-18 [email protected] Add InputDecoration.visualDensity and InputDecorationTheme.visualDensity (flutter/flutter#166834) 2025-04-18 [email protected] Roll Skia from acc910544da7 to 844496884aa0 (1 revision) (flutter/flutter#167389) 2025-04-18 [email protected] Roll Skia from a409d685a711 to acc910544da7 (10 revisions) (flutter/flutter#167388) 2025-04-18 [email protected] Roll Dart SDK from 2bb85834e77e to b1eb743f97f5 (2 revisions) (flutter/flutter#167387) 2025-04-18 [email protected] Roll Fuchsia Linux SDK from m8Aln7fTF_8zy1V9N... to MwYckh5OvwwmIYLx0... (flutter/flutter#167385) 2025-04-17 [email protected] Roll Skia from cc2b57434651 to a409d685a711 (3 revisions) (flutter/flutter#167347) 2025-04-17 [email protected] Reduce app startup latency by initializing the engine on a separate thread (flutter/flutter#166918) 2025-04-17 [email protected] Roll Dart SDK from 992221a362ec to 2bb85834e77e (7 revisions) (flutter/flutter#167361) 2025-04-17 [email protected] Added docstring for FilterInput::GetSnapshot (flutter/flutter#167226) 2025-04-17 [email protected] adds Entity docstrings (flutter/flutter#167228) 2025-04-17 [email protected] fixed impeller golden content scale (flutter/flutter#167308) 2025-04-17 [email protected] Added docstring for FilterContents::RenderFilter (flutter/flutter#167227) 2025-04-17 [email protected] Feat: Add equality to NoDefaultCupertinoThemeData (flutter/flutter#166655) 2025-04-17 [email protected] Fix link to engine docs (flutter/flutter#167346) 2025-04-17 [email protected] [macOS] Enable merged platform and UI thread by default (flutter/flutter#166536) 2025-04-17 [email protected] [Windows] Enable merged platform and UI thread by default (flutter/flutter#163726) 2025-04-17 [email protected] Update `CHANGELOG.md` (flutter/flutter#167225) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…hread (flutter#166918) If settings.merged_platform_ui_thread is set to kMergeAfterLaunch, then the engine will be started on the UI thread. After engine setup completes and the Dart isolate is loaded, the UI task runner will be merged into the platform thread and all future Dart execution will run on the platform thread. This makes it possible for other work to run on the platform thread while the engine starts. See flutter#163064
…parate thread (flutter#166918)" (flutter#167427) This reverts commit c53fdbd. See flutter#167418
…parate thread (flutter#166918)" (flutter#167519) This includes a fix for a race seen in EmbedderTest.PlatformThreadIsolatesWithCustomPlatformTaskRunner The implementaion of MergedPlatformUIThread::kMergeAfterLaunch required changing the interface of the TaskObserverAdd/TaskObserverRemove callbacks so that TaskObserverAdd returned the TaskQueueId where the observer was added. That TaskQueueId would later be given to TaskObserverRemove. The original implementation of this PR updated the embedder library's implementation of TaskObserverAdd to return TaskQueueId::kInvalid to signal that the observer was not added. However, this conflicted with the embedder's EmbedderTaskRunner, whose implementation of GetTaskQueueId returns TaskQueueId::kInvalid as a placeholder. This PR reverts the embedder's TaskObserverAdd/TaskObserverRemove to the original implementation which adds the observer to the current thread's message loop and does not call GetTaskQueueId. See flutter#167418
…lutter#167472) This relands flutter#163726 without changes. The likely reason for flakiness was flutter#166918 (flutter#167418 (comment)). <!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> *Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.* *List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.* *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
If settings.merged_platform_ui_thread is set to kMergeAfterLaunch, then the engine will be started on the UI thread. After engine setup completes and the Dart isolate is loaded, the UI task runner will be merged into the platform thread and all future Dart execution will run on the platform thread.
This makes it possible for other work to run on the platform thread while the engine starts.
See #163064