ابزار سازی
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
دشوار است بدانید که مشکل عملکرد کجاست و کدام کد را باید شروع کرد. با استفاده از ابزارهایی برای کمک به محدود کردن مشکل خود شروع کنید.
بازرس چیدمان
از Layout Inspector برای بررسی طرح بندی خود و مشاهده تعداد ترکیب مجدد استفاده کنید.
اگر UI شما عملکرد ضعیفی دارد، این اغلب به دلیل یک خطای کدگذاری است که مجبور میکند UI شما بیش از حد دوباره ترکیب شود. از سوی دیگر، برخی از خطاهای کدنویسی میتوانند مانع از ترکیب مجدد رابط کاربری شما در صورت لزوم شوند، به این معنی که تغییرات رابط کاربری روی صفحه نمایش داده نمیشوند. ردیابی ترکیب مجدد می تواند به یافتن هر دوی این نوع مشکلات کمک کند.
ترکیب مجدد به خودی خود بد نیست. با این حال، ترکیب مجدد غیرمنتظره می تواند یک مسئله باشد.
برای اطلاعات بیشتر، به مستندات تعداد بازترکیب مجدد Layout Inspector مراجعه کنید.
ردیابی ترکیب
از ردیابی ترکیب برای ردیابی توابع قابل ترکیب خود در ردیابی سیستم استفاده کنید. هنگامی که برای اولین بار به یک مشکل عملکرد نگاه می کنید، ردیابی ها اغلب بهترین منبع اطلاعات هستند. آنها به شما این امکان را می دهند که فرضیه ای در مورد اینکه موضوع چیست و از کجا شروع کنید، تشکیل دهید.
منابع اضافی
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-30 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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 بهوقت ساعت هماهنگ جهانی."],[],[],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."]]