אופטימיזציה של הביצועים התרמיים ושל המעבד באמצעות Android Dynamic Performance Framework
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
במדריך הזה מוסבר איך להשתמש ב-Android Dynamic Performance Framework (ADPF) כדי לבצע אופטימיזציה של משחקים על סמך התכונות הדינמיות לניהול טמפרטורה ומעבד ב-Android. התכונות מיועדות בעיקר למשחקים, אבל אפשר להשתמש בהן גם באפליקציות אחרות שדורשות ביצועים גבוהים.
ADPF הוא קבוצה של ממשקי API שמאפשרים למשחקים ולאפליקציות שדורשות ביצועים גבוהים ליצור אינטראקציה ישירה יותר עם מערכות החשמל והתרמיות של מכשירי Android. בעזרת ממשקי ה-API האלה, אפשר לעקוב אחרי ההתנהגות הדינמית במערכות Android ולבצע אופטימיזציה של ביצועי המשחקים ברמה יציבה שלא גורמת להתחממות יתר של המכשירים.
ל-SoC בניידים ול-Android יש התנהגויות ביצועים דינמיות יותר מאשר למחשבים שולחניים ולקונסולות. ההתנהגויות האלה כוללות ניהול של מצב טמפרטורה, שעוני CPU משתנים וסוגים משתנים של ליבות CPU. השילוב הזה, יחד עם הטופולוגיה המגוונת יותר ויותר של ליבות במערכות על שבב (SoC), יוצר אתגרים כשמנסים לוודא שהמשחק יכול לנצל את ההתנהגות הזו בלי להשפיע לרעה על ביצועי המכשיר. התכונה 'התאמה דינמית של צריכת החשמל' מספקת חלק מהמידע הזה כדי שהביצועים יהיו צפויים יותר.
אלה התכונות העיקריות של ADPF:
- Thermal API: מאפשר לעקוב אחרי המצב התרמי של המכשיר כדי שהאפליקציה תוכל להתאים את עומס העבודה באופן יזום לפני שהוא יהפוך לבלתי נסבל.
- CPU Performance Hint API: מספק רמזים לביצועים שמאפשרים ל-Android לבחור את הגדרות הביצועים הנכונות (למשל, נקודת הפעולה של המעבד או הליבה) עבור עומס העבודה.
- Game Mode API ו-Game State API: ממשקי ה-API האלה מאפשרים לבצע אופטימיזציה של המשחק על ידי מתן עדיפות לביצועים או לחיי הסוללה, על סמך ההגדרות של המשתמש וההגדרות הספציפיות של המשחק.
- מצב ביצועים קבוע: הפעלת מצב ביצועים קבוע במכשיר במהלך השוואה לשוק כדי לקבל מדידות שלא משתנות בגלל תזמון דינמי של מעבד.
- מצב חיסכון באנרגיה: מציין לביקור שאפשר לתזמן את השרשורים בביקור PerformanceHint כך שתינתן עדיפות לחיסכון באנרגיה על פני ביצועים. (זמין ב-Android 15)
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-27 (שעון UTC)."],[],[],null,["# Optimize thermal and CPU performance with the Android Dynamic Performance Framework\n\nThis guide describes how to use the Android Dynamic Performance Framework (ADPF)\nto optimize games based on the dynamic thermal and CPU management features on\nAndroid. The focus is on games, but you can also use the features for other\nperformance-intensive apps.\n\nADPF is a set of APIs that allow games and performance-intensive apps to\ninteract more directly with power and thermal systems of Android devices. With\nthese APIs, you can monitor the dynamic behavior on Android systems and optimize\ngame performance at a sustainable level that doesn't overheat devices.\n\nMobile SoCs and Android have more dynamic performance behaviors than desktops\nand consoles. These behaviors include thermal state management, varying CPU\nclocks, and varying CPU core types. This combined with the increasingly diverse\ncore topology of SoCs creates challenges when trying to ensure that your game\ncan take advantage of this behavior without negatively impacting device\nperformance. ADPF provides some of this information in order to make performance\nmore predictable.\n\nHere are the main ADPF features:\n\n- **Thermal API**: Monitor the thermal state of a device so that the application can proactively adjust workload before it becomes unsustainable.\n- **CPU Performance Hint API**: Provide performance hints that let Android choose the right performance settings (for example, CPU operating point or core) for the workload.\n- **Game Mode API \\& Game State API**: Enable game play optimization by prioritizing performance or battery life characteristics, based on user's settings and game specific configurations.\n- **Fixed Performance Mode**: Enable fixed-performance mode on a device during benchmarking to get measurements that aren't altered by dynamic CPU clocking.\n- **Power Efficiency Mode** : Tells the session that the threads in Performance Hint Session can be safely scheduled to prefer power efficiency over performance. ([Available in Android 15](/reference/android/os/PerformanceHintManager.Session#setPreferPowerEfficiency(boolean)))"]]