Evaluating impact of cross-platform frameworks in energy consumption of mobile applications

23
WEBIST14, Barcelona, 4 April 2014 Evaluating impact of cross-platform frameworks in energy consumption of mobile application Matteo Ciman and Ombretta Gaggi Department of Mathematics University of Padua, Italy {mciman, gaggi}@math.unipd.it WEBIST14 – 10 th International Conference on Web Information Systems and

Transcript of Evaluating impact of cross-platform frameworks in energy consumption of mobile applications

Page 1: Evaluating impact of cross-platform frameworks in energy consumption of mobile applications

WEBIST14, Barcelona, 4 April 2014

Evaluating impact of cross-platform frameworks

in energy consumption of mobile application

Matteo Ciman and Ombretta GaggiDepartment of Mathematics

University of Padua, Italy{mciman, gaggi}@math.unipd.it

WEBIST14 – 10th International Conference on Web Information Systems and Technologies

Page 2: Evaluating impact of cross-platform frameworks in energy consumption of mobile applications

Smartphones equipment

Smartphones equipped with ample set of sensors

WEBIST14, Barcelona, 4 April 2014 2 of 22

Page 3: Evaluating impact of cross-platform frameworks in energy consumption of mobile applications

Mobile Sensing

Data from sensors used for several purposes Activity recognition Mobile healthcare Augmented reality

WEBIST14, Barcelona, 4 April 2014 3 of 22

Page 4: Evaluating impact of cross-platform frameworks in energy consumption of mobile applications

Mobile sensing problem Acquire and use data from smartphone sensors

consumes energy Higher precision requires more data Users always request longer battery life

WEBIST14, Barcelona, 4 April 2014 4 of 22

Page 5: Evaluating impact of cross-platform frameworks in energy consumption of mobile applications

Smartphone application development

Market fragmentation => higher costs to support all mobile platforms

WEBIST14, Barcelona, 4 April 2014 5 of 22

Page 6: Evaluating impact of cross-platform frameworks in energy consumption of mobile applications

Cross-platform frameworks Idea: write a single application in a framework

specific language that is after build into application for the different target platforms

4 different approaches: Web, Hybrid, Interpreted and Cross Compiled

WEBIST14, Barcelona, 4 April 2014 6 of 22

Page 7: Evaluating impact of cross-platform frameworks in energy consumption of mobile applications

Web Approach

WEBIST14, Barcelona, 4 April 2014 7 of 22

Page 8: Evaluating impact of cross-platform frameworks in energy consumption of mobile applications

Web Approach - 2

+ No installation+ Easy update+ User interface reusable across platforms

No access to app store Network delays and reduced performances Difficult to testWEBIST14, Barcelona, 4 April 2014 8 of 22

Page 9: Evaluating impact of cross-platform frameworks in energy consumption of mobile applications

Hybrid Approach

WEBIST14, Barcelona, 4 April 2014 9 of 22

Page 10: Evaluating impact of cross-platform frameworks in energy consumption of mobile applications

Hybrid Approach - 2

+ Store access+ Use of device features

Reduced performances No native look and feel

WEBIST14, Barcelona, 4 April 2014 10 of 22

Page 11: Evaluating impact of cross-platform frameworks in energy consumption of mobile applications

Interpreted Approach

WEBIST14, Barcelona, 4 April 2014 11 of 22

Page 12: Evaluating impact of cross-platform frameworks in energy consumption of mobile applications

+ Store access+ Native look and feel+ Available API for smartphone features access

Reduced performances

Interpreted Approach - 2

WEBIST14, Barcelona, 4 April 2014 12 of 22

Page 13: Evaluating impact of cross-platform frameworks in energy consumption of mobile applications

Cross compiled approach

WEBIST14, Barcelona, 4 April 2014 13 of 22

Page 14: Evaluating impact of cross-platform frameworks in energy consumption of mobile applications

+ Store access+ Native look and feel+ All smartphones features accessible

No reusable user interface Difficulties in code conversion and application

build

Cross compiled Approach - 2

WEBIST14, Barcelona, 4 April 2014 14 of 22

Page 15: Evaluating impact of cross-platform frameworks in energy consumption of mobile applications

Analysis objectives Analyze energy consumption of mobile

applications which acquire data from different sensors Accelerometer Compass Microphone GPS Camera

Compare the native solution with a cross-platform application

WEBIST14, Barcelona, 4 April 2014 15 of 22

Page 16: Evaluating impact of cross-platform frameworks in energy consumption of mobile applications

Related works Other authors already explored energy

consumption in smartphones Thompson et al. proposes a model-driven

methodology (SPOT, System Power Optimization Tool) to estimate energy consumption before app development

AppScope (Yoon et al.) is an Android energy metering system which estimate the usage of hardware components

WEBIST14, Barcelona, 4 April 2014 16 of 22

Page 17: Evaluating impact of cross-platform frameworks in energy consumption of mobile applications

Study setup

Monsoon Power Monitor

Information about «Energy consumption», «Average current and power», «Expected battery life» etc.

WEBIST14, Barcelona, 4 April 2014 17 of 22

Page 18: Evaluating impact of cross-platform frameworks in energy consumption of mobile applications

Study setup - 2 Tested application: native, Phonegap (Hybrid

Approach) and Appcelerator Titanium (Interpreted Approach)

Data acquisition at different sampling rates (when possible)

Test smartphone: Samsung Galaxy i9250 (battery capacity: 1750mAh)

WEBIST14, Barcelona, 4 April 2014 18 of 22

Page 19: Evaluating impact of cross-platform frameworks in energy consumption of mobile applications

Applications

WEBIST14, Barcelona, 4 April 2014 19 of 22

Native Application Phonegap Application Titanium Application

Page 20: Evaluating impact of cross-platform frameworks in energy consumption of mobile applications

Results

Native PhoneGap TitaniumSensor Consumed

Energy(mAh)

D (%) Consumed Energy(mAh)

D (%) Consumed Energy(mAh)

D (%)

Only App 7705,54 +27,42% 8130,85 +34,45% 7860,97 +29,99%Accelerometer 9179,99 +51,80% 12849,82 +112,49% 11972,16* +97,97%*Compass 9489,85 +56,93% 12124,6 +100,50% - -Microphone (Rec)

8120,92 +34,29% 8404,71 +38,98% - -

GPS 9301,48 +53,81% 9947,60 +64,50% 9577,27 +58,37%Camera 21857,38 +261,44% 22347,52 +269,54% 22576,45 +273,33%

WEBIST14, Barcelona, 4 April 2014 20 of 22

Table 1. Energy consumption comparison between native applications and apps developed with a framework for cross-platform development.

Energy consumption without running applications: 6047,31 mAh

Page 21: Evaluating impact of cross-platform frameworks in energy consumption of mobile applications

Results - 2

Consumed energy increase (%)

Sensor 60ms 150ms 300ms 500ms

Accelerometer +112,49% +70,06% +49,48% +40,25%

Compass +100,50% +75,31% +52,92% +46,62%

WEBIST14, Barcelona, 4 April 2014 21 of 22

Table 2. Consumed energy using different sampling frequencies to capture data with Phonegap

Page 22: Evaluating impact of cross-platform frameworks in energy consumption of mobile applications

Conclusions Energy consumption comparison between native

and cross-platform developed applications Results useful to choose the right framework to

develop an application Actually, cross-platform frameworks use more

energy that reduce user experience and acceptance

Compared together, Phonegap requires less energy Future works: study HTML5 (in this case the

browser becomes important) and other frameworks

WEBIST14, Barcelona, 4 April 2014 22 of 22

Page 23: Evaluating impact of cross-platform frameworks in energy consumption of mobile applications

WEBIST14, Barcelona, 4 April 2014

Evaluating impact of cross-platform frameworks

in energy consumption of mobile application

Matteo Ciman and Ombretta GaggiDepartment of Mathematics

University of Padua, Italy{mciman, gaggi}@math.unipd.it

WEBIST14 – 10th International Conference on Web Information Systems and Technologies