Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Determine if Android Performance Hint Manager is useful. #155097

Open
jonahwilliams opened this issue Sep 12, 2024 · 1 comment
Open
Labels
P3 Issues that are less important to the Flutter project team-engine Owned by Engine team triaged-engine Triaged by Engine team

Comments

@jonahwilliams
Copy link
Member

jonahwilliams commented Sep 12, 2024

The android performance hint manager class (https://developer.android.com/ndk/reference/group/a-performance-hint ) allows us to configure various properties of our expected per-frame workloads to help the OS more accurlatly allocate resources (not sure what this means, assuming fast/slow core and/or throttling).

The way this API works is that we can, for each thread, create a sesssion and at the beginning set the target work duration - and at the end set the actual work duration.

in psuedocode:

var session = createSession(this_thread);
session.setTargetWorkDuration(Duration(..));
// Do Work
session.setActualWorkDuration(..).

However, we do not have accurate estimates of the target work duration because this work depends on completely arbitrary workloads created by SDK users. As a result we'd only ever be able to provide the actual work duration. But the OS already knows the actual work duration.

@jonahwilliams jonahwilliams added the team-engine Owned by Engine team label Sep 12, 2024
@jonahwilliams
Copy link
Member Author

APerformanceHint_setPreferPowerEfficiency may be useful for our background workloads, however this seems to only be API 35.

@jonahwilliams jonahwilliams added P3 Issues that are less important to the Flutter project triaged-engine Triaged by Engine team labels Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Issues that are less important to the Flutter project team-engine Owned by Engine team triaged-engine Triaged by Engine team
Projects
None yet
Development

No branches or pull requests

1 participant