SlideShare a Scribd company logo
Performance-based Guidelines
for Energy-efficient Mobile
Applications
Luis Cruz, Rui Abreu
luiscruz@fe.up.pt
rui@computer.org
Motivation
• Mobile and wearable devices
are very popular nowadays
• Users expect all-day battery
life on their devices
• Impact of energy
improvements in mobile
applications is hard to
measure and time consuming
2
Hypothesis
Performance based optimizations
can be used to ship energy efficient
Android applications.
3
Research Questions
RQ1: Can programming practices be blindly applied
in order to improve energy efficiency in an
Android application?
RQ2: Do best practices for performance improvement
also improve energy efficiency?
RQ3: Do these best practices actually have an impact
on real mature Android applications?
4
Research Questions
RQ1: Can programming practices be blindly applied
in order to improve energy efficiency in an
Android application?
RQ2: Do best practices for performance improvement
also improve energy efficiency?
RQ3: Do these best practices actually have an impact
on real mature Android applications?
5
Research Questions
RQ1: Can programming practices be blindly applied
in order to improve energy efficiency in an
Android application?
RQ2: Do best practices for performance improvement
also improve energy efficiency?
RQ3: Do these best practices actually have an impact
on real mature Android applications?
6
Methodology
A. Android application selection
B. Static analysis and refactoring
C. Generation of automatic UI tests
D. Energy measurement tools setup
E. Experiments execution
F. Data analysis
7
A. Android application
selection
• 6 open-source Apps available at Google Play and/or F-Droid
8
Writeily ProLoop - Habit Tracker Talalarmo
GnuCash Simple Gallery Acrylic Paint
B. Static analysis and
refactoring
• Android Lint to detect code smells
• 8 performance-based code smells were studied
• Each code smell was fixed and a new version of
the app was generatedTABLE II: Anti-patterns found in open source applications.
Anti-Pattern Loop - Habit Tracker Writeily Pro Talalarmo GnuCash Acrylic Paint Simple Gallery
DrawAllocation - - • - • -
WakeLock - - • - - -
Recycle - - - • - -
ObsoleteLayoutParam - - - • - -
ViewHolder - • - - - -
Overdraw • • - - • •
UnusedResources • • - - - -
UselessParent - • - - - -
9
C. Generation of automatic
UI tests
• Scripts to mimic user interaction
• Manually created using Android View Client
• Allows replication of experiments
10
• Run apps in bare-board
computer ODROID
• Power sensors for main
CPU, secondary CPU,
memory, and GPU
• 4 samples per second
D. Energy measurement
tools setup
ODROID-XU
©2013 Hardkernel co.
11
D. Energy measurement
tools setup
• Power is an
instantaneous
measurement (watts)
• Energy is a
measurement of
power over a period
of time (joules)
E. Experiments execution
• For every fixed code
smell the experiment
was equally executed
30 times for statistical
validation
Controller
Computer
ODROID
Uninstall App &
remove user data
Install APK
Upload Energy
Logger script
Start Energy Logger
Return Energy
Logger PID
UI interaction
Open App
Return Energy Logs
Open App
Stop Energy Logger
(PID)
ADB through USB
13
F. Data analysis
• Power readings were down-sampled to 1 second
• Energy consumptions that differ 2 standard
deviations from the mean were eliminated
14
Significance Tests
15
Welch’s t-test results
UnusedResource,
and UselessParent
did not provide
significant results.
Fig. 9: Energy consumption for Simple Gallery.
TABLE IV: Significance Welch’s t-test results
Application Pattern Test p-value
Loop - Habit Tracker
Overdraw -0.56 .5784
UnusedResources -0.83 .4121
All -0.08 .9362
Writeily Pro
Overdraw -0.10 .9180
UnusedResources -0.03 .9790
ViewHolder 3.02 .0038
UselessParent 0.20 .8434
All 2.93 .0049
Talalarmo
DrawAllocation 4.18 .0001
WakeLock 4.43 < .0001
All 2.16 .0353
GnuCash
ObsoleteLayoutParam 2.57 .0127
Recycle 2.55 .0140
All 2.47 .0164
AcrylicPaint
DrawAllocation 0.64 .5221
Overdraw 45.88 < .0001
All -5.84 < .0001
Simple Gallery Overdraw -4.04 .0010
DrawAllocation also
Although it occurred in
Talalarmo, we observed
tion was also tested wi
statistically significant im
picker redraw routine. U
debug view updates, we
a single time when a ne
fix in the overall execu
been the reason for not
consumption.
Fixing incorrect Wake
ment of 1%. In the ori
lock was not being pro
to energy drain in part
application is no longer
was not properly releas
power state. This woul
given the nature of ou
effectively tested. Thus,
in a real case scenario.
ObsoleteLayoutParam
Effect SizeTABLE V: Effect size of significant patterns
Application Pattern MD Cohen’s d IMP (%) Savings (min)
Writeily Pro
ViewHolder # -5.39 -0.78 4.50 65
All # -5.42 -0.76 4.53 65
Talalarmo
DrawAllocation # -0.86 -1.11 1.47 21
WakeLock # -0.85 -1.17 1.46 21
All # -0.48 -0.57 0.82 12
GnuCash
ObsoleteLayoutParam # -1.41 -0.67 0.72 10
Recycle # -1.28 -0.66 0.65 9
All # -1.53 -0.64 0.78 11
Acrylic Paint
Overdraw " 1.42 1.64 -2.26 -33
All " 1.37 1.51 -2.18 -31
Simple Gallery Overdraw " 3.08 1.04 -2.11 -30
WakeLock usage also provided an improve-
original version of Talalarmo, the wake
properly released which could have lead
itself several times. In this case, having an
important, and fixing Overdraw is expected
ing results. On the other hand, if a view is be16
View Holder has the biggest impact 😀 while
Overdraw increased energy consumption 😕
Research Questions
RQ1: Can programming practices be blindly applied in order to improve
energy efficiency in an Android application?
Yes, apps had energy efficiency improved without changing the
feature set and without requiring previous knowledge of the app.
RQ2: Do best practices for performance improvement also improve energy
efficiency?
Not necessarily. While five optimizations improved energy
efficiency, two did not affect, and one had a negative impact.
RQ3: Do these best practices actually have an impact on real mature Android
applications?
Yes, three out of six real apps improved energy efficiency.
17
Conclusions & Future Work
• Anti-patterns ViewHolder, DrawAllocation,
WakeLock, ObsoleteLayoutParam, and Recycle have
to be considered when developing energy-efficient
apps
• Extend the study to other optimizations
• Automatic refactoring (Autorefactor, FB pfff, Walkmod,
Kadabra?)
• Label mobile applications with respect to energy
efficiency
18
Hypothesis
Performance based optimizations
can be used to ship energy efficient
Android applications.
3
Effect SizeTABLE V: Effect size of significant patterns
Application Pattern MD Cohen’s d IMP (%) Savings (min)
Writeily Pro
ViewHolder # -5.39 -0.78 4.50 65
All # -5.42 -0.76 4.53 65
Talalarmo
DrawAllocation # -0.86 -1.11 1.47 21
WakeLock # -0.85 -1.17 1.46 21
All # -0.48 -0.57 0.82 12
GnuCash
ObsoleteLayoutParam # -1.41 -0.67 0.72 10
Recycle # -1.28 -0.66 0.65 9
All # -1.53 -0.64 0.78 11
Acrylic Paint
Overdraw " 1.42 1.64 -2.26 -33
All " 1.37 1.51 -2.18 -31
Simple Gallery Overdraw " 3.08 1.04 -2.11 -30
WakeLock usage also provided an improve-
he original version of Talalarmo, the wake
g properly released which could have lead
itself several times. In this case, having an efficient redraw is
important, and fixing Overdraw is expected to create interest-
ing results. On the other hand, if a view is being created several16
View Holder has the biggest impact ! while
Overdraw increased energy consumption "
Research Questions
RQ1: Can programming practices be blindly applied in order to improve
energy efficiency in an Android application?
Yes, apps had energy efficiency improved without changing the
feature set and without requiring previous knowledge of the app.
RQ2: Do best practices for performance improvement also improve energy
efficiency?
Not necessarily. While five optimizations improved energy
efficiency, two did not affect, and one had a negative impact.
RQ3: Do these best practices actually have an impact on real mature Android
applications?
Yes, three out of six real apps improved energy efficiency.
17
19
Full Paper
Performance-based Guidelines for Energy-
efficient Mobile Applications
Luis Cruz, Rui Abreu
All source code and
collected data
20

More Related Content

Similar to Performance-based Guidelines for Energy-efficient Mobile Applications

Green droid automated diagnosis of energy inefficiency for smartphone applica...
Green droid automated diagnosis of energy inefficiency for smartphone applica...Green droid automated diagnosis of energy inefficiency for smartphone applica...
Green droid automated diagnosis of energy inefficiency for smartphone applica...JPINFOTECH JAYAPRAKASH
 
Altitude SF 2017: Granular, Precached, & Under Budget
Altitude SF 2017: Granular, Precached, & Under BudgetAltitude SF 2017: Granular, Precached, & Under Budget
Altitude SF 2017: Granular, Precached, & Under Budget
Fastly
 
Portfolio - Muhammad Ismail Sheikh
Portfolio - Muhammad Ismail SheikhPortfolio - Muhammad Ismail Sheikh
Portfolio - Muhammad Ismail SheikhM. Ismail Sheikh
 
Static Energy Prediction in Software: A Worst-Case Scenario Approach
Static Energy Prediction in Software: A Worst-Case Scenario ApproachStatic Energy Prediction in Software: A Worst-Case Scenario Approach
Static Energy Prediction in Software: A Worst-Case Scenario Approach
GreenLabAtDI
 
HeadSpin Code Profiling
HeadSpin Code ProfilingHeadSpin Code Profiling
HeadSpin Code Profiling
Headspin INC
 
The road to green code
The road to green codeThe road to green code
The road to green code
Olivier Le Goaër
 
Mobilesoft 2017 Keynote
Mobilesoft 2017 KeynoteMobilesoft 2017 Keynote
Mobilesoft 2017 Keynote
Abhik Roychoudhury
 
Samsung Developer's Conference - Maximize App Performance while Minimizing Ba...
Samsung Developer's Conference - Maximize App Performance while Minimizing Ba...Samsung Developer's Conference - Maximize App Performance while Minimizing Ba...
Samsung Developer's Conference - Maximize App Performance while Minimizing Ba...
rickschwar
 
How to Lower Android Power Consumption Without Affecting Performance
How to Lower Android Power Consumption Without Affecting PerformanceHow to Lower Android Power Consumption Without Affecting Performance
How to Lower Android Power Consumption Without Affecting Performance
rickschwar
 
Design Patterns Facilitated by Geode's WAN Distribution
Design Patterns Facilitated by Geode's WAN DistributionDesign Patterns Facilitated by Geode's WAN Distribution
Design Patterns Facilitated by Geode's WAN Distribution
VMware Tanzu
 
Final Exam Questions Fall03
Final Exam Questions Fall03Final Exam Questions Fall03
Final Exam Questions Fall03Radu_Negulescu
 
Solar Based Multiple Charger( System Engineering)
Solar Based Multiple Charger( System Engineering)Solar Based Multiple Charger( System Engineering)
Solar Based Multiple Charger( System Engineering)
Omkar Rane
 
GREENDROID: A SOLUTION TO THE BATTERY PROBLEM OF SMARTPHONE
GREENDROID: A SOLUTION TO THE BATTERY PROBLEM OF SMARTPHONEGREENDROID: A SOLUTION TO THE BATTERY PROBLEM OF SMARTPHONE
GREENDROID: A SOLUTION TO THE BATTERY PROBLEM OF SMARTPHONE
pihu281
 
Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...
Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...
Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...
DataWorks Summit
 
Unit 3 part2
Unit 3 part2Unit 3 part2
Unit 3 part2
Karthik Vivek
 
EE323 Mini-Project - Line tracing robot
EE323 Mini-Project - Line tracing robotEE323 Mini-Project - Line tracing robot
EE323 Mini-Project - Line tracing robotPraneel Chand
 
Accelerometer Controller Robot
Accelerometer Controller RobotAccelerometer Controller Robot
Accelerometer Controller Robot
Nathan Raj
 

Similar to Performance-based Guidelines for Energy-efficient Mobile Applications (20)

Green droid automated diagnosis of energy inefficiency for smartphone applica...
Green droid automated diagnosis of energy inefficiency for smartphone applica...Green droid automated diagnosis of energy inefficiency for smartphone applica...
Green droid automated diagnosis of energy inefficiency for smartphone applica...
 
Altitude SF 2017: Granular, Precached, & Under Budget
Altitude SF 2017: Granular, Precached, & Under BudgetAltitude SF 2017: Granular, Precached, & Under Budget
Altitude SF 2017: Granular, Precached, & Under Budget
 
Portfolio - Muhammad Ismail Sheikh
Portfolio - Muhammad Ismail SheikhPortfolio - Muhammad Ismail Sheikh
Portfolio - Muhammad Ismail Sheikh
 
Static Energy Prediction in Software: A Worst-Case Scenario Approach
Static Energy Prediction in Software: A Worst-Case Scenario ApproachStatic Energy Prediction in Software: A Worst-Case Scenario Approach
Static Energy Prediction in Software: A Worst-Case Scenario Approach
 
greendroid ppts
greendroid pptsgreendroid ppts
greendroid ppts
 
HeadSpin Code Profiling
HeadSpin Code ProfilingHeadSpin Code Profiling
HeadSpin Code Profiling
 
The road to green code
The road to green codeThe road to green code
The road to green code
 
Mobilesoft 2017 Keynote
Mobilesoft 2017 KeynoteMobilesoft 2017 Keynote
Mobilesoft 2017 Keynote
 
Samsung Developer's Conference - Maximize App Performance while Minimizing Ba...
Samsung Developer's Conference - Maximize App Performance while Minimizing Ba...Samsung Developer's Conference - Maximize App Performance while Minimizing Ba...
Samsung Developer's Conference - Maximize App Performance while Minimizing Ba...
 
How to Lower Android Power Consumption Without Affecting Performance
How to Lower Android Power Consumption Without Affecting PerformanceHow to Lower Android Power Consumption Without Affecting Performance
How to Lower Android Power Consumption Without Affecting Performance
 
Design Patterns Facilitated by Geode's WAN Distribution
Design Patterns Facilitated by Geode's WAN DistributionDesign Patterns Facilitated by Geode's WAN Distribution
Design Patterns Facilitated by Geode's WAN Distribution
 
Final Exam Questions Fall03
Final Exam Questions Fall03Final Exam Questions Fall03
Final Exam Questions Fall03
 
Solar Based Multiple Charger( System Engineering)
Solar Based Multiple Charger( System Engineering)Solar Based Multiple Charger( System Engineering)
Solar Based Multiple Charger( System Engineering)
 
GREENDROID: A SOLUTION TO THE BATTERY PROBLEM OF SMARTPHONE
GREENDROID: A SOLUTION TO THE BATTERY PROBLEM OF SMARTPHONEGREENDROID: A SOLUTION TO THE BATTERY PROBLEM OF SMARTPHONE
GREENDROID: A SOLUTION TO THE BATTERY PROBLEM OF SMARTPHONE
 
Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...
Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...
Dr Elephant: LinkedIn's Self-Service System for Detecting and Treating Hadoop...
 
Unit 3 part2
Unit 3 part2Unit 3 part2
Unit 3 part2
 
Energy saving policies final
Energy saving policies finalEnergy saving policies final
Energy saving policies final
 
REPORT.pdf
REPORT.pdfREPORT.pdf
REPORT.pdf
 
EE323 Mini-Project - Line tracing robot
EE323 Mini-Project - Line tracing robotEE323 Mini-Project - Line tracing robot
EE323 Mini-Project - Line tracing robot
 
Accelerometer Controller Robot
Accelerometer Controller RobotAccelerometer Controller Robot
Accelerometer Controller Robot
 

More from MobileSoft

Predicting Android Application Security and Privacy Risk With Static Code Met...
Predicting Android Application Security and Privacy Risk With Static Code Met...Predicting Android Application Security and Privacy Risk With Static Code Met...
Predicting Android Application Security and Privacy Risk With Static Code Met...
MobileSoft
 
A Framework for Regression Testing of Outdoor Mobile Applications
A Framework for Regression Testing of Outdoor Mobile ApplicationsA Framework for Regression Testing of Outdoor Mobile Applications
A Framework for Regression Testing of Outdoor Mobile Applications
MobileSoft
 
Who Changed You? Obfuscator Identification for Android
Who Changed You? Obfuscator Identification for AndroidWho Changed You? Obfuscator Identification for Android
Who Changed You? Obfuscator Identification for Android
MobileSoft
 
Mobile App Development and Management: Results from a Qualitative Investigation
Mobile App Development and Management: Results from a Qualitative InvestigationMobile App Development and Management: Results from a Qualitative Investigation
Mobile App Development and Management: Results from a Qualitative Investigation
MobileSoft
 
Towards Mobile Twin Peaks for App Development
Towards Mobile Twin Peaks for App DevelopmentTowards Mobile Twin Peaks for App Development
Towards Mobile Twin Peaks for App Development
MobileSoft
 
Leafactor: Improving Energy Efficiency of Android Apps via Automatic Refactoring
Leafactor: Improving Energy Efficiency of Android Apps via Automatic RefactoringLeafactor: Improving Energy Efficiency of Android Apps via Automatic Refactoring
Leafactor: Improving Energy Efficiency of Android Apps via Automatic Refactoring
MobileSoft
 
Same App, Different App Stores: A comparative Study
Same App, Different App Stores: A comparative StudySame App, Different App Stores: A comparative Study
Same App, Different App Stores: A comparative Study
MobileSoft
 
Towards Native Code Offloading Platforms for Image Processing in Mobile Appli...
Towards Native Code Offloading Platforms for Image Processing in Mobile Appli...Towards Native Code Offloading Platforms for Image Processing in Mobile Appli...
Towards Native Code Offloading Platforms for Image Processing in Mobile Appli...
MobileSoft
 
Assessing the Impact of Service Workers on the Energy Efficiency of Progressi...
Assessing the Impact of Service Workers on the Energy Efficiency of Progressi...Assessing the Impact of Service Workers on the Energy Efficiency of Progressi...
Assessing the Impact of Service Workers on the Energy Efficiency of Progressi...
MobileSoft
 
IFMLEdit.org: Model Driven Rapid Prototyping of Mobile Apps
IFMLEdit.org: Model Driven Rapid Prototyping of Mobile AppsIFMLEdit.org: Model Driven Rapid Prototyping of Mobile Apps
IFMLEdit.org: Model Driven Rapid Prototyping of Mobile Apps
MobileSoft
 
Performance-based Guidelines for Energy Efficient Mobile Applications
Performance-based Guidelines for Energy Efficient Mobile ApplicationsPerformance-based Guidelines for Energy Efficient Mobile Applications
Performance-based Guidelines for Energy Efficient Mobile Applications
MobileSoft
 
CheckDroid: A Tool for Automated Detection of Bad Practices in Android Applic...
CheckDroid: A Tool for Automated Detection of Bad Practices in Android Applic...CheckDroid: A Tool for Automated Detection of Bad Practices in Android Applic...
CheckDroid: A Tool for Automated Detection of Bad Practices in Android Applic...
MobileSoft
 
Authoring Tool for Location-based Learning Experiences
Authoring Tool for Location-based Learning ExperiencesAuthoring Tool for Location-based Learning Experiences
Authoring Tool for Location-based Learning Experiences
MobileSoft
 
ACCUSE: Helping Users to minimize Android App Privacy Concerns
ACCUSE: Helping Users to minimize Android App Privacy ConcernsACCUSE: Helping Users to minimize Android App Privacy Concerns
ACCUSE: Helping Users to minimize Android App Privacy Concerns
MobileSoft
 
Automatically Locating Malicious Packages in Piggybacked Android Apps
Automatically Locating Malicious Packages in Piggybacked Android AppsAutomatically Locating Malicious Packages in Piggybacked Android Apps
Automatically Locating Malicious Packages in Piggybacked Android Apps
MobileSoft
 
From reactive toproactive mobile security
From reactive toproactive mobile securityFrom reactive toproactive mobile security
From reactive toproactive mobile security
MobileSoft
 
Processing in Mobile Applications: A Case Study
Processing in Mobile Applications: A Case StudyProcessing in Mobile Applications: A Case Study
Processing in Mobile Applications: A Case Study
MobileSoft
 
Rethinking the Mobile Code Offloading Paradigm: From Concept to Practice
Rethinking the Mobile Code Offloading Paradigm: From Concept to PracticeRethinking the Mobile Code Offloading Paradigm: From Concept to Practice
Rethinking the Mobile Code Offloading Paradigm: From Concept to Practice
MobileSoft
 
Generating Predicate Callback Summaries for the Android Framework
Generating Predicate Callback Summaries for the Android FrameworkGenerating Predicate Callback Summaries for the Android Framework
Generating Predicate Callback Summaries for the Android Framework
MobileSoft
 
MobileSoft2017 Opening
MobileSoft2017 OpeningMobileSoft2017 Opening
MobileSoft2017 Opening
MobileSoft
 

More from MobileSoft (20)

Predicting Android Application Security and Privacy Risk With Static Code Met...
Predicting Android Application Security and Privacy Risk With Static Code Met...Predicting Android Application Security and Privacy Risk With Static Code Met...
Predicting Android Application Security and Privacy Risk With Static Code Met...
 
A Framework for Regression Testing of Outdoor Mobile Applications
A Framework for Regression Testing of Outdoor Mobile ApplicationsA Framework for Regression Testing of Outdoor Mobile Applications
A Framework for Regression Testing of Outdoor Mobile Applications
 
Who Changed You? Obfuscator Identification for Android
Who Changed You? Obfuscator Identification for AndroidWho Changed You? Obfuscator Identification for Android
Who Changed You? Obfuscator Identification for Android
 
Mobile App Development and Management: Results from a Qualitative Investigation
Mobile App Development and Management: Results from a Qualitative InvestigationMobile App Development and Management: Results from a Qualitative Investigation
Mobile App Development and Management: Results from a Qualitative Investigation
 
Towards Mobile Twin Peaks for App Development
Towards Mobile Twin Peaks for App DevelopmentTowards Mobile Twin Peaks for App Development
Towards Mobile Twin Peaks for App Development
 
Leafactor: Improving Energy Efficiency of Android Apps via Automatic Refactoring
Leafactor: Improving Energy Efficiency of Android Apps via Automatic RefactoringLeafactor: Improving Energy Efficiency of Android Apps via Automatic Refactoring
Leafactor: Improving Energy Efficiency of Android Apps via Automatic Refactoring
 
Same App, Different App Stores: A comparative Study
Same App, Different App Stores: A comparative StudySame App, Different App Stores: A comparative Study
Same App, Different App Stores: A comparative Study
 
Towards Native Code Offloading Platforms for Image Processing in Mobile Appli...
Towards Native Code Offloading Platforms for Image Processing in Mobile Appli...Towards Native Code Offloading Platforms for Image Processing in Mobile Appli...
Towards Native Code Offloading Platforms for Image Processing in Mobile Appli...
 
Assessing the Impact of Service Workers on the Energy Efficiency of Progressi...
Assessing the Impact of Service Workers on the Energy Efficiency of Progressi...Assessing the Impact of Service Workers on the Energy Efficiency of Progressi...
Assessing the Impact of Service Workers on the Energy Efficiency of Progressi...
 
IFMLEdit.org: Model Driven Rapid Prototyping of Mobile Apps
IFMLEdit.org: Model Driven Rapid Prototyping of Mobile AppsIFMLEdit.org: Model Driven Rapid Prototyping of Mobile Apps
IFMLEdit.org: Model Driven Rapid Prototyping of Mobile Apps
 
Performance-based Guidelines for Energy Efficient Mobile Applications
Performance-based Guidelines for Energy Efficient Mobile ApplicationsPerformance-based Guidelines for Energy Efficient Mobile Applications
Performance-based Guidelines for Energy Efficient Mobile Applications
 
CheckDroid: A Tool for Automated Detection of Bad Practices in Android Applic...
CheckDroid: A Tool for Automated Detection of Bad Practices in Android Applic...CheckDroid: A Tool for Automated Detection of Bad Practices in Android Applic...
CheckDroid: A Tool for Automated Detection of Bad Practices in Android Applic...
 
Authoring Tool for Location-based Learning Experiences
Authoring Tool for Location-based Learning ExperiencesAuthoring Tool for Location-based Learning Experiences
Authoring Tool for Location-based Learning Experiences
 
ACCUSE: Helping Users to minimize Android App Privacy Concerns
ACCUSE: Helping Users to minimize Android App Privacy ConcernsACCUSE: Helping Users to minimize Android App Privacy Concerns
ACCUSE: Helping Users to minimize Android App Privacy Concerns
 
Automatically Locating Malicious Packages in Piggybacked Android Apps
Automatically Locating Malicious Packages in Piggybacked Android AppsAutomatically Locating Malicious Packages in Piggybacked Android Apps
Automatically Locating Malicious Packages in Piggybacked Android Apps
 
From reactive toproactive mobile security
From reactive toproactive mobile securityFrom reactive toproactive mobile security
From reactive toproactive mobile security
 
Processing in Mobile Applications: A Case Study
Processing in Mobile Applications: A Case StudyProcessing in Mobile Applications: A Case Study
Processing in Mobile Applications: A Case Study
 
Rethinking the Mobile Code Offloading Paradigm: From Concept to Practice
Rethinking the Mobile Code Offloading Paradigm: From Concept to PracticeRethinking the Mobile Code Offloading Paradigm: From Concept to Practice
Rethinking the Mobile Code Offloading Paradigm: From Concept to Practice
 
Generating Predicate Callback Summaries for the Android Framework
Generating Predicate Callback Summaries for the Android FrameworkGenerating Predicate Callback Summaries for the Android Framework
Generating Predicate Callback Summaries for the Android Framework
 
MobileSoft2017 Opening
MobileSoft2017 OpeningMobileSoft2017 Opening
MobileSoft2017 Opening
 

Recently uploaded

Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Hivelance Technology
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
Sharepoint Designs
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
ayushiqss
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Strategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptxStrategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptx
varshanayak241
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 

Recently uploaded (20)

Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Strategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptxStrategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptx
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 

Performance-based Guidelines for Energy-efficient Mobile Applications

  • 1. Performance-based Guidelines for Energy-efficient Mobile Applications Luis Cruz, Rui Abreu luiscruz@fe.up.pt rui@computer.org
  • 2. Motivation • Mobile and wearable devices are very popular nowadays • Users expect all-day battery life on their devices • Impact of energy improvements in mobile applications is hard to measure and time consuming 2
  • 3. Hypothesis Performance based optimizations can be used to ship energy efficient Android applications. 3
  • 4. Research Questions RQ1: Can programming practices be blindly applied in order to improve energy efficiency in an Android application? RQ2: Do best practices for performance improvement also improve energy efficiency? RQ3: Do these best practices actually have an impact on real mature Android applications? 4
  • 5. Research Questions RQ1: Can programming practices be blindly applied in order to improve energy efficiency in an Android application? RQ2: Do best practices for performance improvement also improve energy efficiency? RQ3: Do these best practices actually have an impact on real mature Android applications? 5
  • 6. Research Questions RQ1: Can programming practices be blindly applied in order to improve energy efficiency in an Android application? RQ2: Do best practices for performance improvement also improve energy efficiency? RQ3: Do these best practices actually have an impact on real mature Android applications? 6
  • 7. Methodology A. Android application selection B. Static analysis and refactoring C. Generation of automatic UI tests D. Energy measurement tools setup E. Experiments execution F. Data analysis 7
  • 8. A. Android application selection • 6 open-source Apps available at Google Play and/or F-Droid 8 Writeily ProLoop - Habit Tracker Talalarmo GnuCash Simple Gallery Acrylic Paint
  • 9. B. Static analysis and refactoring • Android Lint to detect code smells • 8 performance-based code smells were studied • Each code smell was fixed and a new version of the app was generatedTABLE II: Anti-patterns found in open source applications. Anti-Pattern Loop - Habit Tracker Writeily Pro Talalarmo GnuCash Acrylic Paint Simple Gallery DrawAllocation - - • - • - WakeLock - - • - - - Recycle - - - • - - ObsoleteLayoutParam - - - • - - ViewHolder - • - - - - Overdraw • • - - • • UnusedResources • • - - - - UselessParent - • - - - - 9
  • 10. C. Generation of automatic UI tests • Scripts to mimic user interaction • Manually created using Android View Client • Allows replication of experiments 10
  • 11. • Run apps in bare-board computer ODROID • Power sensors for main CPU, secondary CPU, memory, and GPU • 4 samples per second D. Energy measurement tools setup ODROID-XU ©2013 Hardkernel co. 11
  • 12. D. Energy measurement tools setup • Power is an instantaneous measurement (watts) • Energy is a measurement of power over a period of time (joules)
  • 13. E. Experiments execution • For every fixed code smell the experiment was equally executed 30 times for statistical validation Controller Computer ODROID Uninstall App & remove user data Install APK Upload Energy Logger script Start Energy Logger Return Energy Logger PID UI interaction Open App Return Energy Logs Open App Stop Energy Logger (PID) ADB through USB 13
  • 14. F. Data analysis • Power readings were down-sampled to 1 second • Energy consumptions that differ 2 standard deviations from the mean were eliminated 14
  • 15. Significance Tests 15 Welch’s t-test results UnusedResource, and UselessParent did not provide significant results. Fig. 9: Energy consumption for Simple Gallery. TABLE IV: Significance Welch’s t-test results Application Pattern Test p-value Loop - Habit Tracker Overdraw -0.56 .5784 UnusedResources -0.83 .4121 All -0.08 .9362 Writeily Pro Overdraw -0.10 .9180 UnusedResources -0.03 .9790 ViewHolder 3.02 .0038 UselessParent 0.20 .8434 All 2.93 .0049 Talalarmo DrawAllocation 4.18 .0001 WakeLock 4.43 < .0001 All 2.16 .0353 GnuCash ObsoleteLayoutParam 2.57 .0127 Recycle 2.55 .0140 All 2.47 .0164 AcrylicPaint DrawAllocation 0.64 .5221 Overdraw 45.88 < .0001 All -5.84 < .0001 Simple Gallery Overdraw -4.04 .0010 DrawAllocation also Although it occurred in Talalarmo, we observed tion was also tested wi statistically significant im picker redraw routine. U debug view updates, we a single time when a ne fix in the overall execu been the reason for not consumption. Fixing incorrect Wake ment of 1%. In the ori lock was not being pro to energy drain in part application is no longer was not properly releas power state. This woul given the nature of ou effectively tested. Thus, in a real case scenario. ObsoleteLayoutParam
  • 16. Effect SizeTABLE V: Effect size of significant patterns Application Pattern MD Cohen’s d IMP (%) Savings (min) Writeily Pro ViewHolder # -5.39 -0.78 4.50 65 All # -5.42 -0.76 4.53 65 Talalarmo DrawAllocation # -0.86 -1.11 1.47 21 WakeLock # -0.85 -1.17 1.46 21 All # -0.48 -0.57 0.82 12 GnuCash ObsoleteLayoutParam # -1.41 -0.67 0.72 10 Recycle # -1.28 -0.66 0.65 9 All # -1.53 -0.64 0.78 11 Acrylic Paint Overdraw " 1.42 1.64 -2.26 -33 All " 1.37 1.51 -2.18 -31 Simple Gallery Overdraw " 3.08 1.04 -2.11 -30 WakeLock usage also provided an improve- original version of Talalarmo, the wake properly released which could have lead itself several times. In this case, having an important, and fixing Overdraw is expected ing results. On the other hand, if a view is be16 View Holder has the biggest impact 😀 while Overdraw increased energy consumption 😕
  • 17. Research Questions RQ1: Can programming practices be blindly applied in order to improve energy efficiency in an Android application? Yes, apps had energy efficiency improved without changing the feature set and without requiring previous knowledge of the app. RQ2: Do best practices for performance improvement also improve energy efficiency? Not necessarily. While five optimizations improved energy efficiency, two did not affect, and one had a negative impact. RQ3: Do these best practices actually have an impact on real mature Android applications? Yes, three out of six real apps improved energy efficiency. 17
  • 18. Conclusions & Future Work • Anti-patterns ViewHolder, DrawAllocation, WakeLock, ObsoleteLayoutParam, and Recycle have to be considered when developing energy-efficient apps • Extend the study to other optimizations • Automatic refactoring (Autorefactor, FB pfff, Walkmod, Kadabra?) • Label mobile applications with respect to energy efficiency 18
  • 19. Hypothesis Performance based optimizations can be used to ship energy efficient Android applications. 3 Effect SizeTABLE V: Effect size of significant patterns Application Pattern MD Cohen’s d IMP (%) Savings (min) Writeily Pro ViewHolder # -5.39 -0.78 4.50 65 All # -5.42 -0.76 4.53 65 Talalarmo DrawAllocation # -0.86 -1.11 1.47 21 WakeLock # -0.85 -1.17 1.46 21 All # -0.48 -0.57 0.82 12 GnuCash ObsoleteLayoutParam # -1.41 -0.67 0.72 10 Recycle # -1.28 -0.66 0.65 9 All # -1.53 -0.64 0.78 11 Acrylic Paint Overdraw " 1.42 1.64 -2.26 -33 All " 1.37 1.51 -2.18 -31 Simple Gallery Overdraw " 3.08 1.04 -2.11 -30 WakeLock usage also provided an improve- he original version of Talalarmo, the wake g properly released which could have lead itself several times. In this case, having an efficient redraw is important, and fixing Overdraw is expected to create interest- ing results. On the other hand, if a view is being created several16 View Holder has the biggest impact ! while Overdraw increased energy consumption " Research Questions RQ1: Can programming practices be blindly applied in order to improve energy efficiency in an Android application? Yes, apps had energy efficiency improved without changing the feature set and without requiring previous knowledge of the app. RQ2: Do best practices for performance improvement also improve energy efficiency? Not necessarily. While five optimizations improved energy efficiency, two did not affect, and one had a negative impact. RQ3: Do these best practices actually have an impact on real mature Android applications? Yes, three out of six real apps improved energy efficiency. 17 19
  • 20. Full Paper Performance-based Guidelines for Energy- efficient Mobile Applications Luis Cruz, Rui Abreu All source code and collected data 20