flutteractionsbot 2cf78c5583
[CP-beta][skwasm] Use queueMicrotask instead of postMessage when single-threaded (#167154)
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)

### Issue Link:
https://github.com/flutter/flutter/issues/166905

### Changelog Description:
* [flutter/166905](https://github.com/flutter/flutter/issues/166905) Fixes a performance regression in skwasm when running in single-threaded mode.

### Impact Description:
This fixes a significant regression in the skwasm renderer when running single-thraaded (i.e. in a non-`crossOriginIsolated` browsing context)

### Workaround:
Is there a workaround for this issue?

The only workaround is to run skwasm in a multi-threaded context or to disable skwasm.

### Risk:
What is the risk level of this cherry-pick?

  - [ x ] Low

This essentially returns the single-threaded renderer to the previous message passing strategy.

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

  - [ x ] Yes

### Validation Steps:
What are the steps to validate that this fix works?

Built the Wonderous app and take a Chrome profile.
2025-04-16 01:09:26 +00:00
..

Flutter Engine

Setting up the Engine development environment

See here

gclient bootstrap

Flutter engine uses gclient to manage dependencies.

If you've already cloned the flutter repository:

  1. Copy one of the engine/scripts/*.gclient to the root folder as .gclient:
    1. Googlers: copy rbe.gclient to enable faster builds with RBE
    2. Everyone else: copy standard.gclient
  2. run gclient sync from the root folder