Learning Performance Optimization from Code Changes for Android Apps

Learning Performance Optimization from Code Changes for Android Apps

Performance issues of Android apps can tangiblydegrade user experience. However, it is challenging for Androiddevelopers, especially a novice to develop high-performanceapps. It is primarily attributed to the lack of consolidated andabundant programmatic guides for performance optimization.To address this challenge, we propose a data-based approachto obtain performance optimization practices from historicalcode changes. We first elicit performance-aware Android APIsof which invocations could affect app performance to a largeextent, identify historical code changes that produce impacton app performance, and further determine whether they areoptimization practices. We have implemented this approachwith a tool PERFOPTIMIZERand evaluated its effectiveness in 2open source well-maintained projects. The experimental resultsfound 83 changes relevant to performance optimization. Last,we summarize and explain 5 optimization rules to facilitate thedevelopment of high-performance apps.

Performance is an important metric to assess the qualityof Android apps. High-quality apps are expected to usepower sparingly and respond quickly [5]. However, Androidapps are suffering from serious performance issues such asenergy depletion, memory bloating, and GUI lagging [8].These issues are attributed manifoldly from the app view:the wide presence of demanding high-consuming resourcesfor Android apps. In this paper, we aim to find thoseimproper programming practices and proposing optimizationpractices.Android development documentation has offered a num-ber of performance tips to assist app development [5]. Thesetips are intuitively easy-to-follow, whereas there are stillmany performance optimization practice are unknown. Forexample, relocating some tasks from background threads tothe main thread sometimes can improve app performance tosome extent, which is found by our analysis in Section V-AA number of work has been proposed to enable per-formance bug detection and optimization. Pathaket al.[9]proposed to detect energy hotspots by profiling the energyconsumption of resources. Liuet al.[8] conducted an em-pirical study on resource leak and subsequently developedan approach to detect pertinent performance bugs. Firtman[4] summarized many best performance practices based ondevelopers’ programming experience. Different from otherwork, we aim at distilling performance programming opti-mization practices from historical code changes.To achieve this goal, we have to address two challenges.First, how to identify the code changes related to perfor-mance optimization (e.g., code refactoring). Second, howto abstract the optimization practices effectively from codechanges.In this paper, we propose a systematic approach, termedas PERFOPTIMIZER, to solve the aforementioned challenges.We address the first challenge in three steps. First, we specifyour searching clues in the massive amount of code changesfor fast localization. We start with performance-aware APIs(PAAs) (see Section II-A) that can significantly affect appperformance. Second, we extract code changes from oneopen-source Android project (see Section IV-A). Third, weconduct an impact analysis by portraying API usages inthese changes, and determine the performance impact toAPIs (see Section IV-B). To overcome the second challenge,we define notations to abstract Java code and primitives, andthen summarize these optimization practices for the benefitsof future research (see Section IV-D).Contributions Code Shoppy

Learning Performance Optimization from Code Changes for Android Apps

  Performance Issues in Android AppsAndroid apps, the most popular GUI applications runningon mobile devices, put more emphasize on performanceoptimization than traditional software (e.g., desktop GUIapplications) due to their constrained resources. Therefore,it is crucial for app developers to follow the best practicesfor performance. However, in reality, many apps are stillsuffering from performance issues.In this paper, we identify performance optimization start-ing from considering inappropriate uses of performance-aware Android APIs. These APIs are resource-consuming,so that one inappropriate use of PPAs could lead to per-formance degradation. We obtain the list of PAAs primarilyfrom [7]. In addition, we supplement this list by adding somemethods from popular third party libraries like REALM1.B. Git Code ChangesGit is a widely-used version control system to trackchanges for computer files. The changes are organized in thecommits, and one commit records the involved developers,update time, the comment, and the changes.In this paper, we concentrate on the commits that elevateapp performance by altering the usage of specific PPAs.In Figure 1, the methodgetDrawablecontains a streaminput method which is a performance-critical API, so thatthis method will be added to our local pattern list. Wecan generate a predominator path that consists of conditionnode with the CFG of local method. By comparing thepaths of these two versions, we can see the preconditionif(isDrawableCached())outside the target API was detected.With the context code , we can easily know that would be aperformance optimization. As a validation, we reproducedit with a simple scenario on real devices, and it causedunnegligible performance problem.In this paper, we aim at mining performance optimizationpractices from commit https://codeshoppy.com/android-app-ideas-for-students-college-project.html

Comments

Popular posts from this blog

Online Shopping for Android, PHP, Dotnet & Django Python Projects - CodeShoppy

Premium Php Projects Topics Titles Ideas 2023-Codeshoppy

ANALYSIS Webdevelopment TEACHING WAYS Training - Codeshoppy