[Paper Review] PersisDroid: Android Performance Diagnosis via Anatomizing Asynchronous Executions
PersisDroid is a dynamic instrumentation tool that diagnoses Android app performance by profiling asynchronous executions triggered by UI events. It categorizes these executions into six types, enabling low-overhead, high-compatibility tracking across diverse Android devices, and identifies performance bottlenecks such as long queuing times and improper use of third-party libraries, detecting 20 out of 30 open-source apps with potential issues.
Android applications (apps) grow dramatically in recent years. Apps are user interface (UI) centric typically. Rapid UI responsiveness is key consideration to app developers. However, we still lack a handy tool for profiling app performance so as to diagnose performance problems. This paper presents PersisDroid, a tool specifically designed for this task. The key notion of PersisDroid is that the UI-triggered asynchronous executions also contribute to the UI performance, and hence its performance should be properly captured to facilitate performance diagnosis. However, Android allows tremendous ways to start the asynchronous executions, posing a great challenge to profiling such execution. This paper finds that they can be grouped into six categories. As a result, they can be tracked and profiled according to the specifics of each category with a dynamic instrumentation approach carefully tailored for Android. PersisDroid can then properly profile the asynchronous executions in task granularity, which equips it with low-overhead and high compatibility merits. Most importantly, the profiling data can greatly help the developers in detecting and locating performance anomalies. We code and open-source release PersisDroid. The tool is applied in diagnosing 20 open-source apps, and we find 11 of them contain potential performance problems, which shows its effectiveness in performance diagnosis for Android apps.
Motivation & Objective
- To address the lack of effective tools for diagnosing Android app performance, especially related to asynchronous UI-triggered operations.
- To overcome the challenge of tracking diverse, unstructured ways of starting asynchronous executions in Android apps.
- To design a lightweight, compatible, and efficient profiling solution that captures asynchronous task behavior without requiring kernel or framework recompilation.
- To enable developers to detect and locate performance anomalies such as long queuing times and improper task management in third-party libraries.
- To demonstrate the tool’s effectiveness through real-world evaluation on 30 open-source Android apps.
Proposed method
- Categorizes all possible ways to initiate asynchronous executions in Android into six distinct types based on runtime patterns.
- Applies dynamic instrumentation to only general framework methods, minimizing overhead and ensuring compatibility across diverse Android devices and OS versions.
- Profiles asynchronous tasks in task granularity, capturing execution time, queuing time, and task lifecycle events.
- Uses queuing time as a key indicator for detecting performance issues such as task serialization due to improper use of executors.
- Leverages profiling data to detect common anti-patterns, including misuse of AsyncTask’s execute vs. executeOnExecutor and uncancelled third-party async tasks.
- Employs a lightweight, non-invasive instrumentation approach that avoids kernel or framework modifications, enabling deployment on commercial devices.
Experimental results
Research questions
- RQ1How can asynchronous executions triggered by UI events be systematically categorized and tracked in Android apps?
- RQ2What is a lightweight, compatible, and efficient approach to profile asynchronous task performance without requiring source code or kernel modifications?
- RQ3Can profiling asynchronous task behavior—especially queuing time—effectively reveal performance bottlenecks in real-world Android apps?
- RQ4To what extent can such profiling detect common anti-patterns like improper use of AsyncTask or uncanceled third-party async tasks?
- RQ5How effective is the tool in identifying real performance issues across a diverse set of open-source Android applications?
Key findings
- PersisDroid successfully identifies 20 out of 30 open-source Android apps with potential performance problems, demonstrating strong real-world detection capability.
- The tool detects performance issues caused by excessive queuing time, indicating task serialization due to misuse of asynchronous execution mechanisms.
- Common anti-patterns such as using the default execute method instead of executeOnExecutor in AsyncTask were reliably detected via profiling.
- The tool uncovered uncancelled third-party async tasks in libraries like AsynHttpClient, a known source of resource leaks and performance degradation.
- The dynamic instrumentation approach achieves low overhead and high compatibility, enabling deployment on a wide range of commercial Android devices without recompilation.
- The profiling data enables developers to locate performance anomalies with high precision, significantly reducing manual debugging effort.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.