-
Notifications
You must be signed in to change notification settings - Fork 6k
Replace LinkedLists that are used as a queue in android FlutterRenderer with ArrayDeques #51494
Conversation
I have some notes on benchmarking Android CPU times in https://github.com/flutter/engine/blob/main/impeller/docs/android_cpu_profile.md As long as it is faster locally I'd consider an NTE |
Thanks, I got the benchmarking working. Can I ask what app you were benchmarking in flutter/flutter#143721? It looks like in another issue you referenced it being the gallery, but I see we have both |
This isn't really impeller specific, you should be able to see this with the Skia backend too. Never benchmark on an emulator, you should always use a real device. @johnmccutchan has a fullscreen webview example I was using, I don't have a link to it, but any platform view that continually pumps frames should work. |
I finally got around to testing this, (tested this with the video player plugin on @matanlurey's branch that converts to SurfaceProducer) Saw a similar (though slightly less, from ~20% spent in linked list traversal to ~13% in ArrayDeque traversal) to what was noted in this comment, so I'm going to land this |
…tterRenderer with ArrayDeques (flutter/engine#51494)
…146940) flutter/engine@376c86e...cc73c5c 2024-04-17 [email protected] Replace LinkedLists that are used as a queue in android FlutterRenderer with ArrayDeques (flutter/engine#51494) 2024-04-17 [email protected] [Impeller] Use booleans instead of counting backdrop reads. (flutter/engine#52181) 2024-04-17 [email protected] Update Skia's BUILD.gn (flutter/engine#52194) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: 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
…lutter#146940) flutter/engine@376c86e...cc73c5c 2024-04-17 [email protected] Replace LinkedLists that are used as a queue in android FlutterRenderer with ArrayDeques (flutter/engine#51494) 2024-04-17 [email protected] [Impeller] Use booleans instead of counting backdrop reads. (flutter/engine#52181) 2024-04-17 [email protected] Update Skia's BUILD.gn (flutter/engine#52194) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: 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
…er with ArrayDeques (flutter#51494) Inspired by flutter#50767. [As their documentation notes](https://docs.oracle.com/javase/8/docs/api/java/util/ArrayDeque.html), `ArrayDeque`s are generally faster than LinkedList when used as a queue. Fixes flutter/flutter#143721 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
…er with ArrayDeques (flutter#51494) Inspired by flutter#50767. [As their documentation notes](https://docs.oracle.com/javase/8/docs/api/java/util/ArrayDeque.html), `ArrayDeque`s are generally faster than LinkedList when used as a queue. Fixes flutter/flutter#143721 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
- **Replace LinkedLists that are used as a queue in android FlutterRenderer with ArrayDeques (#51494)** - **Workaround HardwareRenderer breakage in Android 14 (#52370)** Fixes flutter/flutter#147644 Includes #51494 to avoid merge conflicts and have a cleaner merge.
Inspired by #50767.
As their documentation notes,
ArrayDeque
s are generally faster than LinkedList when used as a queue.Fixes flutter/flutter#143721
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.