A performance issue is a problem with how an application delivers service or uses resources. Slow responses are common, but excessive battery or network bandwidth use also counts. Investigate the cause before deciding how to solve it. section 1.2.3
Battery drain from zombie threads
An Android app used a Bluetooth library that created many threads without closing them. The unused threads kept running, contributing to rapid battery consumption; such zombie threads can also cause memory issues and be difficult to investigate. section 1.2.3
For slowness, a profiler can show how much time the application spends on each instruction. File, database, and network I/O calls are common places to investigate; knowing which capability is affected can help narrow the search. Identifying the cause and finding a solution are separate challenges. section 1.2.3
Thread synchronization can also slow execution: locks make threads wait, even when they are needed to protect shared resources. Sample execution first to see whether locks may be involved. If they are, lock profiling can show affected threads, lock counts, monitors, and relationships between waiting threads and the threads causing locks. Use those details to judge whether lock time can be reduced. section 9.4
Investigation and monitoring tools can introduce problems of their own. Storing too many or overly large log messages can affect performance, while a remote debugging agent can slow execution. Avoid remote debugging in production, where it can also interfere with functionality. section 5.2.3 section 4.1
