Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Performance Hint API usage question

114 views
Skip to first unread message

Sergey Petrovskiy

unread,
Dec 4, 2024, 3:03:58 PM12/4/24
to android-ndk
Hi community.

I am a 3d game engine developer.

Some time ago Google has introduced Android Dynamic Performance Framework and the Performance Hint API as part of it.
The idea is clear: you create a session bound to specific thread/threads, declare desired fps (workload time) and report actual time spent. This will help the kernel's scheduler to balance jobs in a better way.
But one thing is not clear to me: if you have two threads (lets say game logic thread and render thread) with its own loops and running in parallel - should I create a single session for two threads (and report from one of them) or two sessions per each thread individually (each thread reports its own workload)?
It is mentioned that Unreal Engine uses personal hint session for each thread, while Cocos2d engine uses single session for all threads.
Which way should I choose? Is it supposed that I should try both variants, measure performance/power consumption and then decide? Are there any recommendations on this choice?

Any hints are appreciated.
Best regards!

Dan Albert

unread,
Dec 4, 2024, 3:40:30 PM12/4/24
to andro...@googlegroups.com, Matt Buckley

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/android-ndk/00c29b73-f7a2-477d-906a-8ceb40579a6bn%40googlegroups.com.

yu...@unity3d.com

unread,
Dec 5, 2024, 1:52:13 AM12/5/24
to android-ndk
Not replacing the answer from respected googlers, but a good common practice would be to 

>  try both variants, measure performance/power consumption and then decide

ALWAYS, and with different devices from different tiers.

Reply all
Reply to author
Forward
0 new messages