# Android Performance and Monitoring (Android) > ประสิทธิภาพและการตรวจสอบ Android: การ profiling, หน่วยความจำ, ANR, การเพิ่มประสิทธิภาพ และเครื่องมือวินิจฉัย - 13 คำถามสัมภาษณ์ - Senior - [คำถามสัมภาษณ์: Android](https://sharpskill.dev/th/technologies/android/interview-questions.md) ## 1. Android Profiler คืออะไร และมี 4 โมดูลอะไรบ้าง? **คำตอบ** Android Profiler เป็นเครื่องมือที่รวมอยู่ใน Android Studio ซึ่งวิเคราะห์ประสิทธิภาพของแอปแบบเรียลไทม์ ช่วยตรวจจับปัญหาด้าน CPU, หน่วยความจำ, เครือข่าย และแบตเตอรี่เพื่อเพิ่มประสิทธิภาพแอป 4 โมดูลของมันคือ: CPU Profiler (การใช้งาน CPU และการติดตามการเรียก), Memory Profiler (การติดตาม heap และการจัดสรร), Network Profiler (คำขอเครือข่ายและการใช้แบนด์วิดท์) และ Energy Profiler (การใช้แบตเตอรี่และ wake locks) ## 2. LeakCanary ตรวจจับและรายงานการรั่วไหลของหน่วยความจำใน Android อย่างไร? **คำตอบ** LeakCanary เป็นไลบรารีที่ตรวจสอบอ็อบเจกต์ที่ควรถูก Garbage Collection เก็บรวบรวมโดยอัตโนมัติ (เช่น Activity หรือ Fragment ที่ถูกทำลาย) หากอ็อบเจกต์ยังคงอยู่ในหน่วยความจำเมื่อไม่ควรอยู่ LeakCanary จะตรวจจับการรั่วไหล วิเคราะห์ห่วงโซ่การเก็บรักษา และแสดงการแจ้งเตือนพร้อมสาเหตุที่เป็นไปได้และ stack trace ## 3. StrictMode ใน Android คืออะไร และใช้ทำอะไร? **คำตอบ** StrictMode เป็นเครื่องมือตรวจจับที่ใช้ระบุแนวปฏิบัติที่ไม่ดีซึ่งอาจบล็อก main thread เช่น การดำเนินการดิสก์หรือเครือข่ายบน UI thread โดยปกติจะเปิดใช้งานในระหว่างการพัฒนาด้วย StrictMode.setThreadPolicy() และ StrictMode.setVmPolicy() ซึ่งมักจะครอบด้วย BuildConfig.DEBUG เมื่อตรวจพบการละเมิด สามารถบันทึกคำเตือน โยน exception หรือแสดงการแจ้งเตือนเพื่อช่วยแก้ไขปัญหาก่อน production ## มีอีก 10 คำถาม - Layout Inspector ใน Android Studio คืออะไร และใช้ทำอะไร? - Systrace ใน Android คืออะไร และใช้ทำอะไร? สมัครฟรี: https://sharpskill.dev/th/login ## หัวข้อสัมภาษณ์ Android อื่นๆ - [พื้นฐาน Android](https://sharpskill.dev/th/technologies/android/interview-questions/android-fundamentals.md): 24 คำถาม, Junior - [UI และทรัพยากร Android](https://sharpskill.dev/th/technologies/android/interview-questions/android-ui-and-resources.md): 30 คำถาม, Junior - [Lifecycle ของ Android](https://sharpskill.dev/th/technologies/android/interview-questions/android-lifecycle.md): 30 คำถาม, Junior - [การนำทาง Android](https://sharpskill.dev/th/technologies/android/interview-questions/android-navigation.md): 26 คำถาม, Junior - [การจัดการข้อมูล Android](https://sharpskill.dev/th/technologies/android/interview-questions/android-data-management.md): 29 คำถาม, Junior - [Networking Android](https://sharpskill.dev/th/technologies/android/interview-questions/android-networking.md): 29 คำถาม, Junior - [การทดสอบ Android](https://sharpskill.dev/th/technologies/android/interview-questions/android-testing.md): 28 คำถาม, Junior - [Android Gradle](https://sharpskill.dev/th/technologies/android/interview-questions/android-gradle.md): 26 คำถาม, Junior - [พื้นฐานภาษา Kotlin สำหรับ Android](https://sharpskill.dev/th/technologies/android/interview-questions/android-kotlin-language-essentials.md): 24 คำถาม, Junior - [Room Database](https://sharpskill.dev/th/technologies/android/interview-questions/android-room-database.md): 25 คำถาม, Mid-Level - [การทำงานเบื้องหลัง](https://sharpskill.dev/th/technologies/android/interview-questions/android-background-work.md): 18 คำถาม, Mid-Level - [Jetpack Compose](https://sharpskill.dev/th/technologies/android/interview-questions/android-compose.md): 28 คำถาม, Mid-Level - [สิทธิ์และฟีเจอร์ของอุปกรณ์](https://sharpskill.dev/th/technologies/android/interview-questions/android-permissions-and-device.md): 21 คำถาม, Mid-Level - [Firebase สำหรับ Android](https://sharpskill.dev/th/technologies/android/interview-questions/android-firebase.md): 23 คำถาม, Mid-Level - [Android MVVM Architecture](https://sharpskill.dev/th/technologies/android/interview-questions/android-mvvm-architecture.md): 18 คำถาม, Mid-Level - [เครือข่าย Android ขั้นสูง](https://sharpskill.dev/th/technologies/android/interview-questions/android-networking-advanced.md): 13 คำถาม, Mid-Level - [Collections และ Operators ใน Kotlin](https://sharpskill.dev/th/technologies/android/interview-questions/android-kotlin-collections-operators.md): 20 คำถาม, Mid-Level - [Kotlin Coroutines และ Flow](https://sharpskill.dev/th/technologies/android/interview-questions/android-kotlin-coroutines-flow.md): 20 คำถาม, Mid-Level - [การฉีด Dependency ใน Android](https://sharpskill.dev/th/technologies/android/interview-questions/android-dependency-injection.md): 15 คำถาม, Mid-Level - [Android MVI Architecture](https://sharpskill.dev/th/technologies/android/interview-questions/android-mvi-architecture.md): 17 คำถาม, Mid-Level - [Android Clean Architecture](https://sharpskill.dev/th/technologies/android/interview-questions/android-clean-architecture.md): 21 คำถาม, Senior - [Android Compose ขั้นสูง](https://sharpskill.dev/th/technologies/android/interview-questions/android-compose-advanced.md): 17 คำถาม, Senior - [Android Security and Privacy](https://sharpskill.dev/th/technologies/android/interview-questions/android-security-privacy.md): 18 คำถาม, Senior - [Android CI/CD and Release](https://sharpskill.dev/th/technologies/android/interview-questions/android-cicd-release.md): 15 คำถาม, Senior - [Android UX and Form Factors](https://sharpskill.dev/th/technologies/android/interview-questions/android-ux-form-factors.md): 18 คำถาม, Senior - [Android Testing Advanced](https://sharpskill.dev/th/technologies/android/interview-questions/android-testing-advanced.md): 18 คำถาม, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/th/technologies/android/interview-questions/android-performance-monitoring