Repository: flutter
Issue: Performance issue with Noto Color Emoji on iOS
Labels: platform-ios,engine,c: performance,a: typography,perf: memory,has reproducible steps,P3,team-ios,triaged-ios,found in release: 3.24,found in release: 3.25

### Steps to reproduce

1. Download the NotoColorEmoji file and add it to the assets.
Location: [Noto Color Emoji](https://fonts.google.com/noto/specimen/Noto+Color+Emoji)
Code: Add the following code to the pubspec.yaml file:
```
fonts:
  - family: NotoColorEmoji
    fonts:
      - asset: asset/font/NotoColorEmoji-Regular.ttf
```

2. Create a view that includes emojis as shown in the code below.

When building a new screen, the rendering appears to be extremely slow *only on iOS*.
After popping the screen and pushing it again, the rendering speed improves.

This issue appears to be related to the following known issues; however, it seems to be a different bug. The suggested temporary solutions do not work in this case.
[Severe Performance issue rendering Emoji's on first run. #42586]
[iOS Crash when using COLR-v1+OT-SVG font and overlay #150765]

### Expected results

The screen that includes this font should build with reasonably good performance on both iOS and Android, even if the screen is slightly slower due to the font.

### Actual results

Screen transitions are extremely slow, and when scrolling through content with long text, there is noticeable lag. 
Sometimes after repeating these actions, the app crashes unexpectedly.

All of these issues occur only on iOS devices.

### Code sample

<details open><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: ElevatedButton(
          onPressed: () {
            Navigator.of(context).push(
              MaterialPageRoute(
                builder: (context) => const ParsedTextPage(),
              ),
            );
          },
          child: const Text('Emoji Text'),
        ),
      ),
    );
  }
}

class ParsedTextPage extends StatelessWidget {
  const ParsedTextPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.grey,
      appBar: AppBar(
        title: const Text('Emoji Text'),
      ),
      body: const Padding(
        padding: EdgeInsets.symmetric(horizontal: 16.0),
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Text(
              'Hello, World! 🐏🐑🐐🐪🐫🐘',
              style: TextStyle(fontFamily: 'NotoColorEmoji', fontSize: 24.0),
            ),
            SizedBox(height: 16.0),
            Text(
              'Hello, World! 👨‍👩‍👧‍👧👨‍👨‍👦👨‍👨‍👧👨‍👨‍👧‍👦',
              style: TextStyle(fontFamily: 'NotoColorEmoji', fontSize: 24.0),
            ),
            SizedBox(height: 16.0),
            Text(
              'Hello, World! 🤡🤥🤓😈👿👹',
              style: TextStyle(fontFamily: 'NotoColorEmoji', fontSize: 24.0),
            ),

          ],
        ),
      ),
    );
  }
}

```

</details>


### Screenshots or Video

<details open>
<summary>Video demonstration</summary>

https://github.com/user-attachments/assets/0ccd1aed-176f-4f0b-9fe5-747d9fe8aae9

</details>


### Logs

<details open><summary>Logs</summary>

There are no unusual logs.
```console
Performing hot restart...
Syncing files to device iPhone 15 Pro Max...
Restarted application in 296ms.
```
</details>

### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
flutter doctor -v                
[✓] Flutter (Channel stable, 3.24.0, on macOS 14.6.1 23G93 darwin-arm64, locale ko-KR)
    • Flutter version 3.24.0 on channel stable at /opt/homebrew/Caskroom/flutter/3.24.0/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 80c2e84975 (6 weeks ago), 2024-07-30 23:06:49 +0700
    • Engine revision b8800d88be
    • Dart version 3.5.0
    • DevTools version 2.37.2

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /Users/shlee/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • ANDROID_HOME = /Users/shlee/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)

[✓] VS Code (version 1.92.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.94.0

[✓] Connected device (6 available)
    • sdk gphone64 arm64 (mobile)     • emulator-5554                        • android-arm64  • Android 15 (API 35) (emulator)
    • iPhone SH (mobile)              • 00008110-000171D63622801E            • ios            • iOS 17.6.1 21G93
    • iPhone 15 Pro Max (mobile)      • 9E81C60E-73EA-4630-B526-EBF96C90497F • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-5 (simulator)
    • macOS (desktop)                 • macos                                • darwin-arm64   • macOS 14.6.1 23G93 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad                • darwin         • macOS 14.6.1 23G93 darwin-arm64
    • Chrome (web)                    • chrome                               • web-javascript • Google Chrome 128.0.6613.120
    ! Device R5CX41CBPNY is not authorized.
      You might need to check your device for an authorization dialog.
    ! Error: Browsing on the local area network for Shinhye의 iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources
    • All expected network resources are available.

• No issues found!
```

</details>