You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[RFC] Android Dynamic Performance Framework (ADPF) Integration for Flutter #195992
📜Issue was posted to Discord. Remove to have the issue reannounced. (For "design doc", "emergency")P2Important issues not at the top of the work listdesign docTracks a design discussion documentteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team
By default on Android, CPU frequency scaling only knows how busy a thread has been recently. It does not know when our frame deadline is or that Flutter splits rendering across a UI thread and a raster thread. When an app wakes up from idle (e.g. after a user reads a screen or a network call finishes), hits a heavy frame during a scroll, or continues scrolling after the user lifts their finger (once the OS touch boost ends), CPU clocks often ramp up too late and we miss frames.
This RFC proposes integrating Android's ADPF (APerformanceHintManager) NDK API on Android 15+ (API 35+) using two APerformanceHintSession instances (one for the UI thread and one for the raster thread) to report per-frame build and raster work durations (APerformanceHint_reportActualWorkDuration2) and post-idle workload resets (APerformanceHint_notifyWorkloadReset on Android 16+ / API 36+).
This sounds interesting, but considering the tiny surface area where it actually makes a difference, I have a hard time considering it a priority. You need to have a very modern version of the operating system and not all hardware venders support it.
This sounds interesting, but considering the tiny surface area where it actually makes a difference, I have a hard time considering it a priority. You need to have a very modern version of the operating system and not all hardware venders support it.
Hmm I agree the surface area is somewhat small - I think OEM gating is the main issue, api 15+ has ~60% cumulative adoption. But I've tested more since writing the rfc and found vivo and motorola phones also support it.
Discounting for api 15+, and for only the chipsets inside OEMs that do support, it seems like roughly (napkin math based on market share) 10% of all android devices currently would benefit? That's somewhat small, but it's still quite a lot of devices, and
it's a pretty small effort to implement, mostly plumbing/api gating because we already record the relevant metrics (probably sub 300 non-test loc, which again is mostly plumbing/api gating).
it's a pretty large impact on that ~10% (20-40% reduction in build/raster times, and focused on the cases that would have janked)
Given that I still personally feel it's worth adopting?
Given that I still personally feel it's worth adopting?
I'm thinking more in terms of opportunity cost. We can spend time implementing and supporting something that benefits 10% of users, but what did we sacrifice with that time? When things only affect a subset of devices the maintenance cost is higher too. Those are my concerns.
📜Issue was posted to Discord. Remove to have the issue reannounced. (For "design doc", "emergency")P2Important issues not at the top of the work listdesign docTracks a design discussion documentteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team
Activity
gaaclarke commentedon Nov 10, 2026
This sounds interesting, but considering the tiny surface area where it actually makes a difference, I have a hard time considering it a priority. You need to have a very modern version of the operating system and not all hardware venders support it.
gmackall commentedon Nov 10, 2026
Hmm I agree the surface area is somewhat small - I think OEM gating is the main issue, api 15+ has ~60% cumulative adoption. But I've tested more since writing the rfc and found vivo and motorola phones also support it.
Discounting for api 15+, and for only the chipsets inside OEMs that do support, it seems like roughly (napkin math based on market share) 10% of all android devices currently would benefit? That's somewhat small, but it's still quite a lot of devices, and
Given that I still personally feel it's worth adopting?
Also to be clear the android team would do this work, the main thing I'd want sign off on is the callback addition:
4c15b12...gmackall:flutter:adpf-pr1-frame-built-callback
gaaclarke commentedon Nov 11, 2026
I'm thinking more in terms of opportunity cost. We can spend time implementing and supporting something that benefits 10% of users, but what did we sacrifice with that time? When things only affect a subset of devices the maintenance cost is higher too. Those are my concerns.
samfadigital-stack commentedon Nov 15, 2026
Add Settings::frame_built_callback for UI frame build timings (flutte…
[Android] Add AndroidPerformanceHintManager wrapper for ADPF API 35+
[Android] Add unit tests for AndroidPerformanceHintManager
[Android] Wire dual-session ADPF performance hints and opt-out flag