שיפור הביצועים
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
המשתמשים מצפים שהאפליקציות יהיו רספונסיביות ומהירות, החל מהפעלת האפליקציה ועד לסיום השימוש בה. אחרי שבודקים את האפליקציה כדי לזהות בעיות בביצועים, אפשר לתקן את הבעיות ולשפר את הביצועים של האפליקציה.
מערכת Android מספקת כלים וספריות רבים שיעזרו לכם לשפר באופן מתמיד את הביצועים של האפליקציה בסביבת הייצור, שבה זה הכי חשוב.
פרופילים בסיסיים
כדי לשפר את הביצועים בצורה הכי יעילה, כדאי להטמיע פרופילים של Baseline באפליקציה או בספרייה. הוא יכול לשפר באופן משמעותי את זמן ההפעלה של האפליקציה, לקצר את זמן הרינדור ולשפר את הביצועים עבור משתמשי הקצה. מידע נוסף על פרופילים של בסיס
פרופילי הפעלה
פרופילים של חברות סטארט-אפ הם תכונה ניסיונית שדומה לפרופילים של חברות בסיס, אבל היא מיושמת בצורה שונה ויש לה יתרונות ייחודיים. פרופיל בסיסי מבצע אופטימיזציה של הביצועים בזמן התקנת האפליקציה במכשיר, ואילו פרופיל הפעלה מוחל בזמן ההידור. הוא מספק ל-R8 shrinker רמזים לקיבוץ מחלקות שנמצאות בשימוש נפוץ בקובץ DEX. כך אפשר להפחית את מספר השגיאות בדף במהלך הפעלת האפליקציה, ולשפר את זמני ההפעלה. מידע נוסף זמין במאמר אופטימיזציות של פריסת DEX ופרופילים של הפעלה.
ספריית הפעלת האפליקציה
ספריית App Startup מאפשרת לכם לבצע אופטימיזציה נוספת של חוויית ההפעלה של האפליקציה. מפתחי ספריות ומפתחי אפליקציות יכולים להשתמש בספריית App Startup כדי לייעל את רצפי ההפעלה ולבצע אופטימיזציה של פעולות ההפעלה.
אופטימיזציה למכשירים עם זיכרון RAM נמוך
שיפורי הביצועים מתחילים מהבסיס. אופטימיזציה למכשירים ברמת הכניסה יכולה לשפר את היעילות בכל קטגוריות המכשירים. במכשירים עם מגבלות זיכרון, סביר יותר שהמשתמשים ייתקלו בבעיות כמו זמן אחזור בהפעלת האפליקציה, אפליקציה שלא מגיבה (ANR) או קריסות של האפליקציה.
כדאי לפתח, לבדוק ולהשוות את האפליקציה שלכם בהתאם לפלח השוק הזה, כדי ליצור בסיס ביצועים טוב לאפליקציה.
Android (Go edition) היא תצורה של מערכת ההפעלה בפלטפורמת Android, שמספקת חוויה אופטימלית למכשירים עם RAM נמוך.
כדי לקבל מידע נוסף על שיפור היציבות והביצועים במכשירים ברמת הכניסה, אפשר לעיין במאמר בנושא אופטימיזציה ל-Android (מהדורת Go).
פתרון בעיות נפוצות
אם הכלים או הספריות הזמינים לא פותרים את בעיות הביצועים, מומלץ לבדוק אם יש בעיות נפוצות ופתרונות באחת מהקטגוריות הבאות:
מקורות מידע נוספים
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון UTC).
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-07-27 (שעון UTC)."],[],[],null,["# Improve performance\n\nUsers expect apps to be responsive and fast, from app startup and throughout the\nentire app experience. After you\n[inspect](/topic/performance/inspecting-overview) your app for performance\nproblems, you can fix any issues and improve your app's performance.\n\nTools and libraries\n-------------------\n\nAndroid provides multiple tools and libraries to continually improve the\nperformance of your app in production, where it matters the most.\n\n### Baseline Profiles\n\nImplement Baseline Profiles into your app or library for the most efficient way\nto improve performance. It can significantly optimize app startup time, reduce\nslow rendering, and improve performance for end users. To learn more, see\n[Baseline Profiles](/topic/performance/baselineprofiles).\n\n### Startup profiles\n\nStartup profiles is an experimental feature that is similar to Baseline\nProfiles, but is applied differently and has distinct benefits. Whereas a\nBaseline Profile optimizes performance as the app is installed on a device, a\nstartup profile is applied at compile-time. It gives the R8 shrinker hints to\ngroup commonly used classes together within the DEX file. This can reduce page\nfaults during app startup, and therefore improve startup times. To learn more,\nsee [DEX layout optimizations and startup\nprofiles](/topic/performance/baselineprofiles/dex-layout-optimizations).\n\n### App Startup library\n\nThe [App Startup library](/topic/libraries/app-startup) lets you further\noptimize the app startup experience. Both library developers and app developers\ncan use the App Startup library to streamline startup sequences and optimize\nstartup operations.\n\nOptimize for low-RAM devices\n----------------------------\n\nPerformance improvements begin from the ground-up. By optimizing for entry-level\ndevices, you can improve efficiency across all device categories. Users are more\nlikely to encounter issues such as app startup latency, application not\nresponding (ANRs), or app crashes when using memory-constrained devices.\nDevelop, test, and benchmark your app with this market segment in mind to create\na performant foundation for your app to build upon.\n\n[Android (Go edition)](/guide/topics/androidgo) is a configuration of the\nAndroid platform OS, which provides an optimized experience for low-RAM devices.\nTo learn more about improving stability and performance for entry-level devices,\nsee [Optimize for Android (Go edition)](/guide/topics/androidgo/optimize).\n\nSolve common problems\n---------------------\n\nIf the available tools or libraries don't resolve your performance issues, we\nrecommend checking for common problems and solutions in any of these categories:\n\n- [App startup](/topic/performance/vitals/launch-time)\n- [Slow rendering](/training/articles/perf-anr)\n- [Memory](/topic/performance/memory-overview)\n- [Battery and power](/training/monitoring-device-state/doze-standby)\n- [App size](/topic/performance/reduce-apk-size)\n\nAdditional resources\n--------------------\n\n- [Background work overview](/guide/background)\n- [Performance class](/topic/performance/performance-class)\n- [App Standby Buckets](/topic/performance/appstandby)\n- [App hibernation](/topic/performance/app-hibernation)"]]