How developers micro-optimize Android apps

Abstract Optimizing mobile apps early on in the development cycle is supposed to be a key strategy for obtaining higher user rankings, more downloads, and higher retention. In fact, mobile platform designers publish specific guidelines, and tools aimed at optimizing apps. However, little research has been done with respect to identifying and understanding actual optimization practices performed by developers. In this paper, we present the results of three empirical studies aimed at investigating practices of Android developers towards improving the performance of their apps, by means of micro-optimizations. We mined change histories of 3513 apps to identify the most frequent micro-optimization opportunities in 297K+ snapshots and to understand if (and when) developers implement these optimizations. Then, we performed an in-depth analysis into whether implementing micro-optimizations can help reduce memory/CPU usage. Finally, we conducted a survey with 389 open-source developers to understand how they use micro-optimizations to improve the performance of Android apps. Surprisingly, our results indicate that developers rarely implement micro-optimizations. Also, the impact of the analyzed micro-optimization on CPU/memory consumption is negligible in most of the cases. Finally, the results from the survey shed some light into why this happens as well as upon which practices developers rely upon.

[1]  Daniela E. Damian,et al.  The promises and perils of mining GitHub , 2009, MSR 2014.

[2]  David Lo,et al.  Understanding the Test Automation Culture of App Developers , 2015, 2015 IEEE 8th International Conference on Software Testing, Verification and Validation (ICST).

[3]  Ahmed E. Hassan,et al.  Security versus performance bugs: a case study on Firefox , 2011, MSR '11.

[4]  Mario Linares Vásquez,et al.  Mining Android App Usages for Generating Actionable GUI-Based Execution Scenarios , 2015, 2015 IEEE/ACM 12th Working Conference on Mining Software Repositories.

[5]  Gabriele Bavota,et al.  Mining energy-greedy API usage patterns in Android apps: an empirical study , 2014, MSR 2014.

[6]  Abram Hindle Green mining: Investigating power consumption across versions , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[7]  Yepang Liu,et al.  Where has my battery gone? Finding sensor related energy black holes in smartphone applications , 2013, 2013 IEEE International Conference on Pervasive Computing and Communications (PerCom).

[8]  Ahmed E. Hassan,et al.  A qualitative study on performance bugs , 2012, 2012 9th IEEE Working Conference on Mining Software Repositories (MSR).

[9]  Paul Petersen Intel® Parallel Studio , 2011, Encyclopedia of Parallel Computing.

[10]  Marco Torchiano,et al.  An empirical validation of FindBugs issues related to defects , 2011 .

[11]  Tian Jiang,et al.  Discovering, reporting, and fixing performance bugs , 2013, 2013 10th Working Conference on Mining Software Repositories (MSR).

[12]  Jun Yan,et al.  Characterizing and detecting resource leaks in Android applications , 2013, 2013 28th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[13]  Jan Jürjens,et al.  Comparing Bug Finding Tools with Reviews and Tests , 2005, TestCom.

[14]  Shan Lu,et al.  Understanding and detecting real-world performance bugs , 2012, PLDI.

[15]  A. Strauss,et al.  Grounded theory , 2017 .

[16]  Peter Hegedus Revealing the Effect of Coding Practices on Software Maintainability , 2013, 2013 IEEE International Conference on Software Maintenance.

[17]  Lori L. Pollock,et al.  From benchmarks to real apps: Exploring the energy impacts of performance-directed changes , 2016, J. Syst. Softw..

[18]  Abram Hindle,et al.  Energy Profiles of Java Collections Classes , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE).

[19]  Leif Singer,et al.  An exploratory study of the adoption of mobile development platforms by software engineers , 2014, MOBILESoft 2014.

[20]  Mario Linares-Vasquez,et al.  Enabling Testing of Android Apps , 2015, 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering.

[21]  Lei Yang,et al.  ADEL: an automatic detector of energy leaks for smartphone applications , 2012, CODES+ISSS.

[22]  Romain Rouvoy,et al.  Mining Test Repositories for Automatic Detection of UI Performance Regressions in Android Apps , 2016, 2016 IEEE/ACM 13th Working Conference on Mining Software Repositories (MSR).

[23]  Abram Hindle,et al.  GreenMiner: a hardware based mining software repositories software energy consumption framework , 2014, MSR 2014.

[24]  Ramesh Govindan,et al.  Estimating Android applications' CPU energy usage via bytecode profiling , 2012, 2012 First International Workshop on Green and Sustainable Software (GREENS).

[25]  David Hovemeyer,et al.  Using Static Analysis to Find Bugs , 2008, IEEE Software.

[26]  Tibor Gyimóthy,et al.  A probabilistic software quality model , 2011, 2011 27th IEEE International Conference on Software Maintenance (ICSM).

[27]  Todd D. Millstein,et al.  RERAN: Timing- and touch-sensitive record and replay for Android , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[28]  Abram Hindle Green mining: A methodology of relating software change to power consumption , 2012, 2012 9th IEEE Working Conference on Mining Software Repositories (MSR).

[29]  Anders P. Ravn,et al.  Device Monitors , 1980, IEEE Transactions on Software Engineering.

[30]  Romain Rouvoy,et al.  An Empirical Study of the Performance Impacts of Android Code Smells , 2016, 2016 IEEE/ACM International Conference on Mobile Software Engineering and Systems (MOBILESoft).

[31]  Philippe Kruchten,et al.  Real Challenges in Mobile App Development , 2013, 2013 ACM / IEEE International Symposium on Empirical Software Engineering and Measurement.

[32]  Christopher Vendome,et al.  How developers detect and fix performance bottlenecks in Android apps , 2015, 2015 IEEE International Conference on Software Maintenance and Evolution (ICSME).

[33]  Yu Lin,et al.  Study and Refactoring of Android Asynchronous Programming (T) , 2015, 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[34]  Youjip Won,et al.  I/O Stack Optimization for Smartphones , 2013, USENIX ATC.

[35]  Joseph A. Maxwell,et al.  Qualitative Research Design: An Interactive Approach , 1996 .

[36]  Mario Linares Vásquez,et al.  Auto-completing bug reports for Android applications , 2015, ESEC/SIGSOFT FSE.

[37]  Ramesh Govindan,et al.  Calculating source line level energy information for Android applications , 2013, ISSTA.

[38]  William G. J. Halfond,et al.  Truth in Advertising: The Hidden Cost of Mobile Ads for Software Developers , 2015, 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering.

[39]  William G. J. Halfond,et al.  How Does Code Obfuscation Impact Energy Usage? , 2014, 2014 IEEE International Conference on Software Maintenance and Evolution.

[40]  Gabriele Bavota,et al.  The Impact of API Change- and Fault-Proneness on the User Ratings of Android Apps , 2015, IEEE Transactions on Software Engineering.

[41]  Rudolf Ferenc,et al.  Qualitygate SourceAudit: A tool for assessing the technical quality of software , 2014, 2014 Software Evolution Week - IEEE Conference on Software Maintenance, Reengineering, and Reverse Engineering (CSMR-WCRE).

[42]  Mario Linares Vásquez,et al.  Revisiting Android reuse studies in the context of code obfuscation and library usages , 2014, MSR 2014.

[43]  Spyridon Panagiotakis,et al.  Efficient Energy Consumption's Measurement on Android Devices , 2012, 2012 16th Panhellenic Conference on Informatics.

[44]  Dongkun Shin,et al.  Optimizing storage performance of Android smartphone , 2013, ICUIMC '13.

[45]  Marco Tulio Valente,et al.  Study on the relevance of the warnings reported by Java bug-finding tools , 2011, IET Softw..

[46]  Chung-Ta King,et al.  ANEPROF: Energy Profiling for Android Java Virtual Machine and Applications , 2011, 2011 IEEE 17th International Conference on Parallel and Distributed Systems.

[47]  Ming Zhang,et al.  Bootstrapping energy debugging on smartphones: a first look at energy bugs in mobile devices , 2011, HotNets-X.

[48]  Yepang Liu,et al.  Characterizing and detecting performance bugs for smartphone applications , 2014, ICSE.

[49]  Sorin Lerner,et al.  Towards Verifying Android Apps for the Absence of No-Sleep Energy Bugs , 2012, HotPower.

[50]  Marco Torchiano,et al.  Assessing the precision of FindBugs by mining Java projects developed at a university , 2010, 2010 7th IEEE Working Conference on Mining Software Repositories (MSR 2010).

[51]  Samuel P. Midkiff,et al.  What is keeping my phone awake?: characterizing and detecting no-sleep energy bugs in smartphone apps , 2012, MobiSys '12.

[52]  Mario Linares Vásquez,et al.  FUSION: A Tool for Facilitating and Augmenting Android Bug Reporting , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering Companion (ICSE-C).

[53]  Gabriele Bavota,et al.  Optimizing energy consumption of GUIs in Android apps: a multi-objective approach , 2015, ESEC/SIGSOFT FSE.

[54]  Lori L. Pollock,et al.  How do code refactorings affect energy usage? , 2014, ESEM '14.

[55]  David J. Sheskin,et al.  Handbook of Parametric and Nonparametric Statistical Procedures , 1997 .

[56]  William Pugh,et al.  The Google FindBugs fixit , 2010, ISSTA '10.

[57]  Laurie A. Williams,et al.  On the value of static analysis for fault detection in software , 2006, IEEE Transactions on Software Engineering.

[58]  R. Grissom,et al.  Effect sizes for research: A broad practical approach. , 2005 .

[59]  Christopher Vendome,et al.  Automatically Discovering, Reporting and Reproducing Android Application Crashes , 2016, 2016 IEEE International Conference on Software Testing, Verification and Validation (ICST).

[60]  Wei Le,et al.  A comparison of energy bugs for smartphone platforms , 2013, 2013 1st International Workshop on the Engineering of Mobile-Enabled Systems (MOBS).

[61]  Stefan Wagner,et al.  An Evaluation of Two Bug Pattern Tools for Java , 2008, 2008 1st International Conference on Software Testing, Verification, and Validation.