Repository: flutter
Issue: [Android] Delay on first input
Labels: platform-android,perf: speed,P2,team-android,triaged-android

There is a slight delay on my first input when tapping on a button on android:


https://github.com/user-attachments/assets/9135ba7d-93ca-4a7c-9569-4274bdc01985

It isn't super easy to see in the video? But feels noticeable when interacting with the app.

<details>
<summary>lib/main.dart</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(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: Center(
          child: MenuAnchor(
            builder: (context, controller, child) => TextButton(
              onPressed: () {
                controller.isOpen ? controller.close() : controller.open();
              },
              child: Text('Press here'),
            ),
            menuChildren: [
              SubmenuButton(menuChildren: [
                MenuItemButton(
                  onPressed: () {},
                  child: Text('Menu item'),
                ),
              ], child: Text('Submenu')),
            ],
          ),
        ),
      ),
    );
  }
}
```
</details>

<details>
<summary>flutter doctor -v</summary>

```console
[!] Flutter (Channel [user-branch], 3.26.0-1.0.pre.89, on macOS 14.6.1 23G93 darwin-arm64, locale en)
    ! Flutter version 3.26.0-1.0.pre.89 on channel [user-branch] at /Users/mackall/development/flutter/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/setup.
    ! Upstream repository unknown source is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
    • Framework revision 04e1b174ea (2 days ago), 2024-09-11 23:30:50 +0530
    • Engine revision 4eb729b7a5
    • Dart version 3.6.0 (build 3.6.0-239.0.dev)
    • DevTools version 2.39.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0-rc4)
    • Android SDK at /Users/mackall/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0-rc4
    • 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.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A507
    ✗ Unable to get list of installed Simulator runtimes.
    ! CocoaPods 1.11.3 out of date (1.13.0 is recommended).
        CocoaPods is a package manager for iOS or macOS platform code.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/to/platform-plugins
      To update CocoaPods, see https://guides.cocoapods.org/using/getting-started.html#updating-cocoapods

[✓] 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.71.2)
    • VS Code at /Users/mackall/Downloads/Visual Studio Code.app/Contents
    • Flutter extension version 3.60.0

[✓] Connected device (4 available)
    • Pixel 7 Pro (mobile)            • 34011FDH3001H9        • android-arm64  • Android 13 (API 33)
    • 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 129.0.6668.42

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 2 categories.
```
</details>

Noticed when testing https://github.com/flutter/engine/pull/55157, but occurs on master.