כלים
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
יכול להיות שיהיה לכם קשה לדעת איפה הבעיה בביצועים ואיזה קוד כדאי להתחיל לשפר. כדאי להתחיל להשתמש בכלים שיעזרו לכם לצמצם את האפשרויות ולמצוא את מקור הבעיה.
כלי לבדיקת פריסות
אפשר להשתמש בכלי לבדיקת פריסה כדי לבדוק את הפריסה ולראות את מספר ההרכבות מחדש.
אם הביצועים של ממשק המשתמש נמוכים, בדרך כלל הסיבה לכך היא שגיאת קידוד שגורמת להרכבה מחדש של ממשק המשתמש יותר מדי פעמים. מצד שני, שגיאות מסוימות בקוד יכולות למנוע את ההרכבה מחדש של ממשק המשתמש כשצריך, מה שאומר ששינויים בממשק המשתמש לא מוצגים במסך. מעקב אחרי הרכבות מחדש יכול לעזור לכם לזהות את שני סוגי הבעיות האלה.
הקומפוזיציה מחדש עצמה היא לא בעיה, אבל קומפוזיציה מחדש לא צפויה יכולה להיות בעיה.
מידע נוסף זמין במאמר בנושא ספירת הרכבות מחדש בכלי לבדיקת פריסות.
מעקב אחר יצירות מוזיקליות
אפשר להשתמש בתיעוד עקבות של קומפוזיציה כדי לתעד את העקבות של הפונקציות שניתנות להרכבה בתיעוד עקבות של המערכת. בדרך כלל, עקבות הם המקור הכי טוב למידע כשבודקים בעיה בביצועים. הם מאפשרים לכם לגבש השערה לגבי הבעיה ולקבוע איפה כדאי להתחיל לחפש.
מקורות מידע נוספים
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-30 (שעון 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-30 (שעון UTC)."],[],[],null,["# Tooling\n\nIt can be hard to know where a performance issue lies and what code to start\noptimizing. Start by using tools to help narrow down where your issue is.\n\nLayout Inspector\n----------------\n\nUse the [Layout Inspector](/develop/ui/compose/tooling/debug#layout_inspector) to inspect your layout and see recomposition\ncounts.\n\nIf your UI has poor performance, this is often because of a coding error that\nforces your UI to be recomposed excessively. On the other hand, some coding\nerrors can prevent your UI from being recomposed when it needs to be, which\nmeans UI changes aren't showing up on the screen. Tracking recompositions can\nhelp find both of these kinds of problems.\n\nRecomposition in itself is not bad; however, unexpected recomposition can be an\nissue.\n\nFor more information, see the Layout Inspector [recomposition counts](/develop/ui/compose/tooling/debug#recomposition-counts)\ndocumentation.\n\nComposition tracing\n-------------------\n\nUse [composition tracing](/develop/ui/compose/tooling/tracing) to trace your composable functions in a system\ntrace. Traces are often the best source of information when first looking into a\nperformance issue. They allow you to form a hypothesis of what the issue is and\nwhere to start looking.\n\nAdditional Resources\n--------------------\n\n- **[App performance guide](/topic/performance/overview)**: Discover best practices, libraries, and tools to improve performance on Android.\n- **[Inspect Performance](/topic/performance/inspecting-overview):** Inspect app performance.\n- **[Benchmarking](/topic/performance/benchmarking/benchmarking-overview):** Benchmark app performance.\n- **[App startup](/topic/performance/appstartup/analysis-optimization):** Optimize app startup.\n- **[Baseline profiles](/baseline-profiles):** Understand baseline profiles."]]