SlideShare a Scribd company logo
1 of 20
Download to read offline
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 BudgetFastly
 
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 ApproachGreenLabAtDI
 
HeadSpin Code Profiling
HeadSpin Code ProfilingHeadSpin Code Profiling
HeadSpin Code ProfilingHeadspin INC
 
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 Performancerickschwar
 
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 DistributionVMware 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 SMARTPHONEpihu281
 
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
 
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 RobotNathan 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 ApplicationsMobileSoft
 
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 AndroidMobileSoft
 
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 InvestigationMobileSoft
 
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 DevelopmentMobileSoft
 
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 RefactoringMobileSoft
 
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 StudyMobileSoft
 
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 AppsMobileSoft
 
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 ApplicationsMobileSoft
 
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 ExperiencesMobileSoft
 
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 ConcernsMobileSoft
 
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 AppsMobileSoft
 
From reactive toproactive mobile security
From reactive toproactive mobile securityFrom reactive toproactive mobile security
From reactive toproactive mobile securityMobileSoft
 
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 StudyMobileSoft
 
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 PracticeMobileSoft
 
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 FrameworkMobileSoft
 
MobileSoft2017 Opening
MobileSoft2017 OpeningMobileSoft2017 Opening
MobileSoft2017 OpeningMobileSoft
 

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

Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Intelisync
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 

Recently uploaded (20)

Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 

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