An empirical study of the performance impacts of Android code smells

Because Android mobile devices have limited constraints such as CPU, memory, and battery, Android mobile applications must be designed for performance and quality. In order to improve mobile application performance, the Android developer documentation recommends to avoid code smells, or bad designs, such as Internal Getter/Setter, Member Ignoring Method and HashMap Usage.

This paper found that correcting such code smells in two open source Android applications led to performance improvements when ran on devices using the Dalvik runtime. The study did not find significant performance improvements when ran on devices using the ART runtime, which account for about one-third of Android devices.

The authors created three versions of each app in which they individually corrected Internal Getter/Setter, Member Ignoring Method, and HashMap Usage, and one version of each app in which they corrected all three. For each app, they executed an automated Python script that navigated through most functionalities, views, and menus of the app while measuring UI drawing performance, memory usage and garbage collection calls. At the end of the study, they concluded that correcting Member Ignoring Method resulted in a 12.4% reduction of one apps dropped frames, correcting HashMap Usage resulted in an overall 3.6% reduction in garbage collection calls, and the correction of all three code smells resulted in positive impacts for each of the assessed metrics.