React Native For Beginner 2023
React Native For Beginner 2023
native application
development
A comparative study based on features &
functionality when measuring performance in hybrid
and native applications
551 11 Jönköping
Summary
Summary
This essay has been done at Tekniska Högskolan in Jönköping.
Smartphone apps today have a wide array of different usages & features and several
different tools can be used to develop these smartphone apps. These tools can be
broken down into three different categories, depending on what type of app they
create: Native, hybrid, or web apps. These types of apps come with their advantages
and disadvantages when it comes to development, performance, and costs to name
a few.
The purpose of this paper seeks to answer performance issues around gradual app
development in the native development language Kotlin, in comparison to the
hybrid development framework React Native, with a focus on common
functionalities. The focus on functionality adds the perspective of not only
performance but also how a native and hybrid app may respond to the
implementations, to give a wider glance at how native and hybrid compare. This
may give a better understanding of how the development will turn out for both
hybrid and native, in real-life cases. The chosen components for performance in
this study are CPU, RAM, and battery.
The method to carry out this research involves the implementation of two testing
apps for smartphones, one for Kotlin and one for React Native who function the
same for the corresponding platform. The testing apps are a construct of various
functionality that will be gradually measured in experiments. The experiments for
the apps have been created to be a mixture of user usage and assurance of
representative data from the smartphone’s hardware components when the testing
app is running.
The experiments conducted in this essay show that React Native has an overall
worse performance than Kotlin when it comes to CPU processing and that React
Native is more prone to having a negative response in performance when features
or functionality are implemented. Memory usage did not show the same clear
difference. A functionality that performed somewhat worse than the others
involved for React Native compared to Kotlin was GPS, as further investigation of
the collected data showed.
Keywords
App development, Functionality, Kotlin, React Native, Performance, Android
development, Hybrid, Native.
1
Abbreviations
Abbreviations
JVM – Java Virtual Machine
API – Application Programming Interface
ADB – Android Debug Bridge
GPS – Global Positioning System
App – Application (smartphone)
CPU – Central Processing Unit
RAM – Random Access Memory
GPU – Graphics Processing Unit
UI – User Interface
SDK – Software Development Kit
2
Contents
Contents
1 Introduction .............................................................................. 6
1.1 BACKGROUND ......................................................................................................................... 8
3
Contents
4
Contents
6 References ............................................................................... 46
7 Appendices .............................................................................. 48
5
Introduction
1 Introduction
These days, modern smartphone apps can be divided into three major categories:
hybrid, native, and web apps, as explained in [1] [2]. When starting the development
of an app for a smartphone, one must choose how to implement it and which of
these three ways suits best.
Native apps are not web-based like hybrid or web apps are. Native apps are coded
and executed in the machine language of the hardware platform they are intended
for, which also means that one app can only be developed to one platform at a time.
Native apps generally have better performance because of this. Support for device
access, such as the smartphone’s camera and GPS are also most accessible and
extensive in native apps.
Hybrid apps are essentially web apps that have been put in a native shell. These
apps behave almost like native apps and have the advantage of developing to
multiple platforms such as iOS or Android with one codebase. This is in React
Native’s case enabled by native code being rendered but implemented with
JavaScript. Hybrid apps also have good device access with packages or libraries that
enables support for all the smartphone’s built-in features such as camera or GPS,
along with a UI that is like a native app.
Lastly, web apps are apps that run as a website through a browser with the
preference of being viewed on a smartphone. This kind of app traditionally has less
device access, has a harder time displaying a native UI appearance, and generally has
poorer performance. Web apps are however becoming a more prominent choice as
of late for app development, for instance, progressive web apps (PWA) which has
more in common with native or hybrid solutions, as written in [3]. The upside to
this kind of app is that the app is easier to implement and cheaper to develop and
maintain. As seen in figure 1 below where it’s illustrated how the three different
ways of methods are rendered in the smartphone.
6
Introduction
Device access Platform SDK enables Device features can be Most of features are
access to all device accessed, but depending accessible
features on the tool
Code reusability Code for one platform Most hybrid tools will Browser compatibility are
only works for that enable portability of a the only concerns
platform single codebase to the
major mobile platforms
App performance Great Good Moderate
The process of choosing between one of these three ways can be hard and tiresome
since there are so many variables to attune for. However, one should start from the
beginning of smartphone app development. The first issue to consider when
developing a smartphone app is the need and what kind of problem the app is trying
to solve, as explained in [6]. When a need and a problem have been defined the
appropriate features should be considered to fill the need and to solve the problem.
The features of a smartphone app have a major impact on how the app will perform
as it will utilize the smartphone in different ways. Features and functionality are
therefore a good standpoint for the choice between native, hybrid, or web. A map
app using GPS features behaves much differently from a social media app and
conditions and implementations will be different between native, hybrid, and web.
Functionality is an aspect of what software or hardware features can do for the user,
such as camera access, Bluetooth communication, or retrieving phonebook contacts
from the user’s smartphone. This thesis aims to investigate how some of these
different features and functionalities affect the performance of an app on Android
smartphones when developing for native and hybrid, excluding web. It also aims to
investigate app performance that motivates the use of a feature or functionality over
the other for native or hybrid, based on the results from experiments. The focus on
performance is during development and with the addition of functionalities in a test
app, rather than merely the measurements with all functionality combined. This
paper goes in-depth on functionality, implementation, and investigation on how
these affect an app’s performance on smartphones.
7
Introduction
by users. The chosen parameters to investigate and monitor for the hardware
components in this study are:
The motivation behind the choice for these three components is that they (except
for battery) are central to a device’s overall speed. The battery is instead the
counterweight and accounts for the speed’s impact on the smartphone’s battery life.
The impact on the smartphone’s performance is an important factor when choosing
between these different implementations and fits best for the subject of this thesis.
1.1 Background
The choice between hybrid and native can however become tricky depending
on what functionality the app is supposed to have. If roadblocks from the choice
of tool for development or the functionalities needed would occur it is a lot of work
to either try to work around it or switch tool entirely. The functionalities chosen for
further investigation in this study resides in common functionalities that most apps
have and that cover different categories i.e., device access or internet
communication.
• [7] Set out to try and replicate an existing native Android app in React Native
to measure performances as well as comparing the overall UI differences.
The study showed that the UI difference between native and hybrid was not
protruding but native performed a bit better when evaluating performance,
which included GPU frequency, CPU load, memory usage, and power
consumption. The tests were however manual, and it is noted that automatic
testing might have led to more accurate results.
8
Introduction
• [9] Recreates an existing native app in React Native through a port and has
a focus on background processing and Bluetooth but also evaluates
functionality such as notifications and graphs. The evaluation is based on
performance, functionality, and codebase sizes. The study includes both iOS
and Android, where a worse result for hybrid is presented compared to iOS
than Android when it comes to CPU utilization including Bluetooth
functionality. Memory consumption shows similar results. Native code
implementation was however used for React Native when implementing the
Bluetooth functionality.
The studies [7] and [8] are from 2016, just a year after React Native was released,
which would explain the worse UI elements and system performance presented in
the study. Both React Native and Kotlin get updated regularly over the years which
could have a big impact on performance and measured parameters, as shown in
their release notes [10] [11].
1.1.2 Collaboration
This study is in collaboration with Cybercom Jönköping, who are interested in a
study of this kind. Cybercom Jönköping takes part in the development of a wide
array of smartphone apps and often gets confronted with what technologies and
tools that is best suited for projects. From this study, the students and Cybercom
aim to get a good understanding of React Native and natives’ performance and the
functionalities impact during development and more insight to what way to choose
when confronted with the decision to choose hybrid or native development.
If performance issues would occur during development, the developers would want
to know where and why, and if those issues could lead to bigger problems down
the road. If a certain implementation or functionality is causing worse performance
one would like to know this from the start and plan accordingly to decide which
technology would work best to implement the app. This could be the case for React
Native because of its non-native implementations of functionality. This problem
also touches upon what features or functionalities have the biggest difference
performance-wise between native and hybrid development. Examples of features
or functionality are device access such as camera and GPS or internet services such
as API requests and database storing.
9
Introduction
Drawing from the conclusions of previous works, hybrid development may be the
easiest and most comfortable way to develop smartphone apps in some cases. But
in a different context would native still be a clear choice, as native has been shown
to have a slightly better performance. The overall question has many variables to
attune to (as explained in the introduction) but an important one is the app’s
functionalities impact on the performance of the smartphone. And simply not
overall, but during development. If problems with an app would occur during
development, it could have big implications both business-wise and technical-wise,
as a lot of progress could be lost or be in vain.
RQ1‘s purpose is to establish a foundation for further research and study. The
question is answered through experiments and observing the results. RQ2’s answer
extends upon RQ1 and will need additional analysis to how, when and, why the
results are happening.
10
Introduction
both from 2016. Therefore, can this study not answer for how older or newer
devices would perform during testing of this paper.
The breaking point, which is the main foundation for research question two (RQ2)
is defined and limited by the following set of restraints:
• It is the largest difference between React Native and Kotlin between two
development stages.
• Several instances of the greatest difference can be found between the same
two development stages in different measurements.
• It is in majority.
1.5 Outline
This section intends to explain how the report was structured and will briefly explain
what will be covered in the chapters.
i. Theoretical Background
This chapter covers relevant papers and literature and briefly explains
different technical aspects that will be used throughout the paper and their
background.
ii. Method and Implementation
Explains how the research questions will be answered and through what
tools. This section creates a connection between the research questions and
the method and explains in-depth how the method to conduct experiments
will be implemented.
iii. Findings and Analysis
When the necessary data has been collected it will be analyzed and presented
graphically for the reader to get a better understanding of the finalized
results.
11
Theoretical background
2 Theoretical background
This section will cover the current survey of relevant literature, background
research, and explanation of theoretical concepts. Most of the content of the
headings will be of different smartphone functionality.
A similar work from 2018 [9] investigates the functionality in React Native and
native. However, this paper has a focus on four different functionalities:
notifications, graphs, Bluetooth, and background processes. The ‘future work’
section of this research paper mentions that additional research within this area is
interesting, but with different or more functionalities. In our thesis, functionalities
have been chosen to support the measurement of several app implementations and
to bring something new to the table.
When evaluating the performances from past works the parameters that were
looked at were CPU usage, battery drainage, memory usage and, in some cases
GPU. Past works have focused mostly on the performance overall together with UI
differences, while this study will investigate changes in performance during
development as more implementations and functionalities are added to apps. A
specific testing app will also be developed instead of trying to replicate or simply
port an app from native to hybrid. This study does also not have a focus on
graphical performance, as the test app will consist of a minimal number of pages
(focusing on functionality) and therefore excluding GPU performance as a
parameter to measure.
12
Theoretical background
with. When surveying members of Stack Overflow about which framework was
most wanted, React Native ranked highest at 13% and the contender flutter ranked
at 6.7% as presented in [5]. Because of the support React Native has over other
frameworks, React Native was chosen for the investigations in this paper.
2.2.2 Kotlin
Kotlin is a programming language on the rise to develop native Android apps with.
Native Android apps can be developed in two different languages, whereas Kotlin
is one and the other is Java. However, Java will not be covered in this thesis. Java
has been covered in many previous works while Kotlin has gotten less exposure,
which emphasizes the choice of native implementation in this study. Kotlin was
first released back in 2011 but had an official release in 2016. Kotlin has begun to
become a more common choice to develop Android apps in and is supported on
Android developer’s official website, but the competitor language Java is still the
most common since it has been around for longer (1995).
2.3 Functionalities
A brief background on various app functionalities in a smartphone.
2.3.1 API
API stands for app Programming Interface and enables data exchange between two
different software systems, functioning as a bridge for an interaction. These
interactions between two software systems can range between login into a certain
website, fetching weather from a user’s area to uploading files to a database. When
databases are referred to in this paper it will mostly refer to an API database
2.3.2 Database
A database is a data structure that stores organized information. The most common
database is the relational database which contains tables that often includes multiple
fields of information. Databases are used almost anywhere in online systems and
apps. In smartphone apps, a database can for example be used to store high scores
from a game or contain a person’s images and posts from a social media profile.
2.3.3 Bluetooth
Bluetooth is a wireless technology that enables short-range communications
between Bluetooth-compatible devices such as smartphones, headsets, or laptops.
The technology is based on radio waves with a 2.4 GHz frequency which because
of the high frequency limits the range to about 9 meters.
13
Theoretical background
2.3.5 GPS
GPS stands for Global Positioning System and is a worldwide used satellite system
used to determine the ground position of an object. GPS receivers are included in
a wide array of commercial products such as smartphones and automobiles.
Figure 2 below explains how ADB works, by connecting your smartphone to your
computer and on the computer, ADB runs through a shell that passes through the
commands to the phone.
14
Theoretical background
smartphones. The CPU operates on different cores with multiple threads which
are affected by operations the CPU is conducting, impacting its speed to handle the
calculations and operations.
The measurement from the CPU in this study will be from the load on User, System,
and app. System refers to the amount of CPU time used by the kernel. The kernel
is responsible for low-level tasks, such as interactions with the hardware and
memory allocation. User refers to user space processes, which are higher-level
processes like an application or a database running on the device. App is the load
on, and the time spent by the CPU on the developed app/package.
15
Method and implementation
The method for this thesis begins with a literature review and an in-depth look at
Kotlin and React Native to pave a path and foundation for experiments, which will
be the main subject of the method. The literature study includes which important
aspects shall be explored and considered when it comes to creating Android apps
for both Kotlin and React Native, and what has previously been explored. The
literature study also included research for which functionalities to investigate
further, as a pilot study. The experiments, test scenarios, and test cases will be
described along with the functionalities that are relevant to each test case.
The second research question; Is there a breaking point of app implementation where React
Native’s impact on smartphone performance is considerably worse compared to Kotlin? And if so,
with what functionality and why? is directly connected to RQ1, with RQ1 answered can
the process of investigating if a curve will appear and where it starts. When adding
more functionality and implementations of features in the test apps it will require
more RAM, CPU, and battery power. The goal is to investigate if at some point
during this process, a conclusion can be made if there is a point where Kotlin is
performing notably better than React Native. Depending on the results will the
question to ‘why?’ be answered through a deeper look at the functionality in
question, including its implementation, package, and area of use.
The focus was finding future work in already published papers as well as the method
sections where different experiment concepts were examined. The findings of each
paper were also of interest. Literature studies are also important in motivating why
our thesis is important by looking at older works so that there is no academic
research yet within this field. By researching previous papers, it can be concluded
which areas are extra important to conduct research within and how to try and bring
something new to the table.
16
Method and implementation
For the scope of this project, six functionalities were chosen that could be separated
into three different categories: device access, internet communication, and
background processing. These three categories cover the major functions that an
app usually has. In table 2 below are the chosen functionalities displayed and
grouped by their respective category.
The reasoning behind the choice of these functionalities is that they easily interact
with each other (which creates a more realistic scenario for their usage) cover a wide
area of smartphone feature access and are commonly featured functionalities in
smartphone apps.
3.3 Experiments
To answer the first research question (RQ1) will experiments be conducted by
creating one test app in Kotlin and one test app in React Native, with several
versions of the same test app containing different amounts of implementations and
functionality. The goal of RQ2 is to find out if there is a breaking point
performance-wise for React Native. The experiments will be conducted in a way
that enables quantitative research as described in [18], which means that the
experiments must be able to be conducted multiple times without any unknown
variables changing.
This will be done by eliminating all human interaction during the testing phase
through automatic scrips that interact with the smartphone. This will in the end lead
17
Method and implementation
to empirical data that can be compared and evaluated for a result that will determine
the differences for each added functionality and implementation.
The parameters to be measured during these tests are:
These parameters are of interest in this study because they play a central role in how
fast the smartphone can execute intended actions and how much power these
actions draw from the smartphone. The parameters will be measured throughout
the whole experiment whereas the CPU’s workload is measured in percentage, the
memory in megabytes, and battery drainage in voltage. The functionalities that are
included in the experiments are also to be executed within milliseconds of each
other, to get a big impact as possible on the above parameters. Functionality that is
executed separately or far apart from each other will simply not have a meaningful
impact on the goal of this study. An exception is a functionality that operates
individually in the background, such as audio playback and Bluetooth.
3.3.1 Devices
The experiments were executed on two Android devices and the device model and
hardware specifications are presented in table 3 below.
Device OS RAM CPU Battery
Huawei Honor 8 Android 4 GB 2.3 GHz x 8 cores Cortex- 3000 mAh
A72 & Cortex A53
Samsung Galaxy S7 Android 4 GB 2.3 GHz x 8 cores 3000 mAh
Mongoose & Cortex-A53
Table 3. Devices used and their hardware specifications.
3.3.2 Test Scenario
By combining several different functionalities seamlessly and in a concrete context
can a test scenario be created. A test scenario contains several test cases. An
illustration of this test scenario is demonstrated below in figure 4. The numbers
between 1 and 6 indicate test cases and the chronological order of implementation
and the surrounding boxes represent a contained test case, which is explained under
the next header. To further stress test performance, the app will in the later instances
include background processes with sound playback and Bluetooth communications
(5 and 6) to see if there are any notable changes in the performance. Figure 4 below
is a visualization of the increasing functionality and the foundation for the
experiments.
18
Method and implementation
19
Method and implementation
will be used are Huawei Honor 8 and Samsung Galaxy S7, both from 2016. As
mentioned, the reasoning behind utilizing two phones is that it will give a better
foundation when analysing the test results.
Test case 2-4 also includes external factors like other platforms or services which
has their own impact on the experiments, which must be accounted for. For
example, test case 3 includes sending a request to fetch weather information from
an API. It is not guaranteed that this API is consistent with its speed of the response
during the experiments. To minimize this kind of external impact on the
experiments must parameters be set which lessens the impact of such anomalies.
The most direct approach is to run several iterations of the tests to gather a larger
amount of data which would “flatten out” the anomalies from external sources such
as the API from test case 3. This issue will be more touched upon in “Arrangement
of experiments”.
3.3.5 Coding & structure
The implementation and coding of the apps will be test case-specific, meaning that
one test case will be implemented at a time in the corresponding apps. By
implementing one test case at a time, it is possible to make the apps as identically as
possible, which will create accurate results for the experiments that will be
conducted. All code is public and shared on GitHub [20], this creates transparency
so that future works may analyze and investigate the code. Utilizing GitHub will
help to organize the different test cases. This is done by dividing implementation
into different branches, enabling easy access to the various timestamps of the
incremental implementation of the test apps. Branching is a feature that GitHub
and other remote source control tools have which is used to save implementations
in a coding project.
When all test cases have been implemented in each app, will the testing be
conducted individually and collectively with the existing previous test cases for any
new variables changing in the performance, as described earlier in this section. Each
test case will be presented in chronological order to make the reader and other
researchers understand more about how and why different functionalities were
implemented.
20
Method and implementation
Figure 6. Screenshots of the main-view (left) and the test-scenario (right) from the native test app.
Figure 7. Screenshots of the main-view (left) and the test scenario-view (right) from the React
Native test app.
21
Method and implementation
In Kotlin was a native class/library used and in React Native was a npm package
called “React-Native Get Location” [23] used to ease up development. This package
is a small lightweight package and was chosen for its simplicity. The goal of the test
case is to fetch coordinates and nothing else. Figure 9 displays the logic of test case
2.
22
Method and implementation
This test case takes a photo, fetches the coordinates, and then fetches the current
weather from the coordinates. In Kotlin the library Volley [24] was used to send an
HTTP GET request to the API. Volley is a common library used to send HTTP
requests and is referenced in the documentation on Android developer’s official
website, which emphasized the choice of this library. React Native did not need a
library or a package, to send the API request. Figure 10 shows the logic for test case
3.
23
Method and implementation
For React Native was a npm package called “React Native Sound” [27] used which
enables the developer to queue an mp3 file for playback. React Native Sound is a
commonly downloaded npm package and has all the basic functionality such as
play/stop, volume, and the ability to play a track from either a file or a network. In
this test case will the audio be played from a file. Implementing the audio playback
for Kotlin is simple since you only need to utilize the inbuilt class to play any audio
file that you include in the project. The logic of test case 5 is presented in figure 12.
24
Method and implementation
The approach for the Bluetooth part was to implement a server-side on the
computer that was created with the help of python. A client-side was implemented
on the smartphone test app to create a scenario where the client continuously sends
data to the server to simulate a likely scenario that could happen with the use of
Bluetooth.
3.5 Arrangement of Experiments
Test case 1-4 is initiated by simply taking a photo during the experiments. The test
cases will then be executed within milliseconds of each other and use each other’s
information in different ways. Test cases 5-6 will be started automatically when the
test scenario is initiated and then run in the background as the other test cases are
executed through automatic input. Table 4 below shows the structure of the
experiments. The execution is illustrated from left to right in chronological order.
From the table, it is also shown that in total will six experiments be conducted for
each smartphone.
Experiment Test Take photo
case 1
Experiment Test Take photo Fetch GPS
case 2 coordinates
Experiment Test Take photo Fetch GPS API request
case 3 coordinates
Experiment Test Take photo Fetch GPS API request Send to
case 4 coordinates database
Experiment Test Start audio Take photo Fetch GPS API request Send to
case 5 playback coordinates database
Experiment Test Start Start audio Take photo Fetch GPS API Send to
case 6 Bluetooth playback coordinates request database
connection
Table 4. Structure of experiments with test cases.
25
Method and implementation
Multiple cycles of the test cases will also give more accurate results and eliminate
some of the anomalies that may occur in the parameters during testing. The
smartphones used for testing will be restarted for the first experiment to get more
accurate data. The smartphone will then be restarted between every test case. The
reasoning behind this is to give each test case the same conditions. A diagram of
the structure for test cases 1-4 is presented in figure 14 below.
26
Method and implementation
27
Findings and analysis
28
Findings and analysis
Samsung Galaxy S7
For test case 2 there is a shift in the CPU user and system usage however this time
CPU app has a higher usage in React Native compared to Kotlin. There is still a
pattern here with a bigger RAM usage for React Native than Kotlin.
CPU User (%) CPU System (%) CPU App (%) RAM (KB) RAM (%) Battery (V)
29
Findings and analysis
In the third test case it is noted that performance for CPU user and system has
increased for both Kotlin and React Native, whilst app usage stays the same for
Kotlin but decreases for React Native. The RAM usage stays around the same with
just a slight increase for React Native.
CPU User (%) CPU System (%) CPU App (%) RAM (KB) RAM (%) Battery (V)
Table 10. Data extracted from test case 3 with Galaxy S7.
Samsung Galaxy S7
In the fourth test case there is still a higher usage for CPU user and system on React
Native whereas Kotlin has a decrease in said processes. CPU app stays around the
same as test case three for Kotlin but React Native sees a decrease in usage. RAM
usage is increased by about 1 percent point for both Kotlin and React Native.
CPU User (%) CPU System (%) CPU App (%) RAM (KB) RAM (%) Battery (V)
Table 12. Data extracted from test case 4 with Galaxy S7.
4.1.5 Test Case 5
The data found for test case 5, which is presented in table 13 and 14 below.
Huawei Honor 8
30
Findings and analysis
Samsung Galaxy S7
Looking at table 14 it is easy to note that the parameters that has changed noticeably
is the CPU performance for React Native, where the parameters has decreased by
quite a bit. The table shows that Kotlin has decreased for CPU system and app but
not user, and that RAM has increased very small.
CPU User (%) CPU System (%) CPU App (%) RAM (KB) RAM (%) Battery (V)
Table 14. Data extracted from test case 5 with Galaxy S7.
4.1.6 Test Case 6
The data found for test case 6, which is presented in table 15 and 16 below.
Huawei Honor 8
With the second addition of a background process, Bluetooth; can the biggest
difference in performance be seen for Kotlin, at least for all CPU processes as
memory remains largely unaffected. The user CPU process has an increase of
roughly 18 percent points from the last test case while the processes in app sees an
increase of roughly 10 percent points and system a smaller increase of about 8
percent points. Hybrid also suffers a major increase in CPU processing power in
user and app measurements. User processes has an increase of roughly 10 percent
points while app increases about the same with roughly 9 percent points. Both
process powers are also the highest recorded of all test cases for both Kotlin and
React Native. System processes remain largely the same however for React Native
and the same goes for the memory.
CPU User (%) CPU System (%) CPU App (%) RAM (KB) RAM (%) Battery (V)
31
Findings and analysis
Samsung Galaxy S7
The biggest change in all the CPU performance parameter can been seen here, with
a huge increase for React Native CPU user with a 116 percent points increase. With
the Bluetooth implemented we can see that the CPU app is bigger now for React
Native rather than Kotlin, also the CPU system sees a notable spike in the
percentage of usage for both Kotlin and React Native. RAM however stays around
the same as previous test cases but with more usage for React Native.
CPU User (%) CPU System (%) CPU App (%) RAM (KB) RAM (%) Battery (V)
Table 16. Data extracted from test case 6 with Galaxy S7.
32
Findings and analysis
Chart 2. Data from user CPU processes with Samsung Galaxy S7.
33
Findings and analysis
Kotlin has a more strange and unpredicted result between the test cases. At first
decreasing a bit to then fall in processing power drastically and to then see an
increase again. It can either be a deviation for test case 4 or that internet
communication does not have a big impact on the performance, resulting in non-
linear measurements. However, after test case 4 there is again an increase in power
where test case 6 sees a huge amount of increase for Kotlin, which cannot be seen
for React Native.
34
Findings and analysis
processing to the highest of the measured test cases. Kotlin starts off very steady
with only minor increases in power, but then unlike React Native has a decline for
test case 4, the addition of database integration. Kotlin also suffers a big increase
for Bluetooth on a kernel-level.
Chart 4. Data from system CPU processes for Samsung Galaxy S7.
35
Findings and analysis
Chart 6. Data from app CPU processes for Samsung Galaxy S7.
36
Findings and analysis
4.2.2 RAM
The measurements from the RAM show different results between the smartphones.
37
Findings and analysis
38
Findings and analysis
Honor 8 Test Case Kotlin CPU APP (%) React Native CPU APP (%) Difference (pp)
4 2,4 14,9 12,5
Honor 8 Test Case Kotlin CPU USER (%) React Native CPU USER (%) Difference (pp)
5 10,15 24,425 14,275
Honor 8 Test Case Kotlin CPU SYSTEM (%) React Native CPU SYSTEM (%) Difference (pp)
5 11,125 18,075 6,95
Galaxy S7 Test Case Kotlin CPU APP (%) React Native CPU APP (%) Difference (pp)
6 68,8275 93,325 24,4975
Galaxy S7 Test Case Kotlin CPU USER (%) React Native CPU USER (%) Difference (pp)
6 170,4 272,775 102,375
Galaxy S7 Test Case Kotlin CPU SYSTEM (%) React Native CPU SYSTEM (%) Difference (pp)
4 87,66 158,6 70,94
Table 17. Table of biggest difference in CPU processing per test case.
39
Findings and analysis
From the differences found could then the differences in processing power between
test cases be calculated, which is the foundation for finding a breaking point. The
breaking point indicates where and with what addition of functionality that increases
the processing power the most, and most often.
Table 18 below shows the biggest difference between React Native and Kotlin for
each CPU process as well as their individual differences between test cases. Positive
numbers in the column for Kotlin/React Native difference again means a poorer
performance for React Native. From these calculations could it be shown that React
Native had worse development between test cases in 19 out of 30 cases. From this
table can also the breaking point be found which is located between test case one
and two for Samsung Galaxy S7 in the system process. This is supported by the
second biggest difference which also is located between test case one and two for
Samsung Galaxy S7, but in the user process. Huawei Honor 8 does however not
have a breaking point since at least two of the biggest difference are not between
the same test case. The whole table is available in appendix 27.
Honor 8 Test Cases Kotlin CPU APP (pp) React Native CPU APP (pp) Kotlin/React Native Difference (pp)
Table 18. Table of biggest difference between test cases in CPU processing.
40
Discussion and conclusions
The methods used to answer the research questions in this thesis was quite unique
in the sense that it had not been utilized in related works before. The result satisfied
the research questions which proved that there was a good bridge between the
method and the research questions. The method did however prove to give a
slightly less accurate answer for parts of our second research question, due to the
data that was extracted. There were some studies that were related to the thesis
however the studies only briefly covered some parts of the performance and were
mostly focused on other aspects. With help of the literature review, the research
questions managed to be formed into more unique and specific questions that had
not been researched before.
The use of test cases had several benefits, for one it was easy to simply step back
and see how the functionality affected the performance for both Kotlin and React
Native. Test cases also make it more clear and easier for the reader and other
interested parties to see how and what has been implemented if further studies were
to be done. Also, each test case provides clear data that shows exactly how both
Kotlin and React Native affect the performance of the smartphones.
One of the downsides with ADB when investigating the performance parameters
on the phones was that ADB responded differently when utilized on different
smartphones. ADB is a great tool for reading the different hardware performance
whilst connected to the phone but when it responded differently depending on
which smartphone that was used, some compromises had to be made. For example,
with the experiment collection on the Huawei smartphone only one script needed
to be utilized to collect the necessary data. With the Samsung smartphone, the
scripts needed to be broken into two different scripts and then used separately, this
meant more time for the collection of data. Overall ADB is a great tool for diving
into the smartphone and accessing information that was useful for this study. The
values received for battery consumption were not a good way to discuss and
conclude how much battery the apps consumed.
To summarise this chapter, we believe that our choice of methods has thoroughly
answered the research questions, for the most part. The methods providing
empirical data have been presented in a reliable way but that also leaves room for
future research. However, it is worth noting that Huawei and Samsung responded
differently to the performance tests, this leaves a question should the study have
included more smartphones, and would this have a significant impact on the result?
Also, would a rearrangement of the different test cases leave different results? These
are good questions to ask and would need a change in the method to be able to be
answered.
41
Discussion and conclusions
And
2. Is there a breaking point of app implementation where React Native’s impact
on app performance is considerably worse compared to Kotlin? And if so,
with what functionality and why?
Each research question will be now be accounted for under the next-coming
headlines.
This essay can also add that React Native shows an overall worse performance that
correlates with the implementation of functionality. This means that we have found
that the more functionality that is added to the app; the worse will React Native’s
impact be on the smartphone’s CPU compared to Kotlin. Even though some small
deviations have occurred in this statement. This can also be seen in table 19 as React
Native’s worst difference is in test cases 5 and 6. Kotlin does not show the same
behaviour for increased implemented functionality and has much more anomalies
such as decreases in CPU power in latter test cases, which we have interpreted as
Kotlin being in some cases unaffected by the increased number of functionalities.
For memory usage, a certain statement cannot be made in terms of a difference in
performance. For Huawei Honor 8 was there not a big difference between React
42
Discussion and conclusions
Native and Kotlin in memory usage, they were about the same. However, on
Samsung Galaxy S7 React Native utilized more memory than Kotlin on all test
cases. Unlike the CPU measurements where both smartphone’s data were mostly
similar, does the RAM data contradict each other entirely. This results in an
unsureness for memory usage between React Native and Kotlin. More tests on
smartphones could result in more confident answers in memory usage.
The summarized conclusion for the first research question is that React Native has
worse performance in terms of CPU than Kotlin, both overall and in response to
implementation of functionality. Memory usage is unclear and further testing on
more smartphones would be needed.
5.2.2 Research question 2, part one
The second research question investigates where React Native has a worse
development in performance compared to Kotlin between test cases, to find the
functionality that has the worst development, or in other words; a breaking point.
React Native had worse development on CPU load in 19 out of 30 cases, as
described in 4.2.4 Further analysis. This means that across both smartphones and
all CPU processes, React Native handles individual implemented functionality
worse than Kotlin ~63% of the time in our measurements. The biggest difference
out of these 19 cases is considered a breaking point if it occurs between the same
test cases in at least two of the three CPU process measurements: app, user, and
system. Since it then also will be in majority. With this definition could one definitive
breaking point be found for Samsung Galaxy S7 where the difference between test
case 1 and 2 was 53.03 percent points for React Native compared to Kotlin. For
Huawei Honor 8 could not a definitive breaking point be found.
From this can it be speculated that the npm packages that are used for implementing
functionalities in React Native, are in majority across the measurements showing a
worse performance than the built-in libraries of Kotlin and native development.
Since a breaking point could also only be bound for one of the smartphones, the
smartphones also play a key part. Part two of this heading will cover it further.
5.2.3 Research question 2, part two
Through calculating the difference between each test case for Kotlin and React
Native and finding where the biggest difference is most often, can it be concluded
that this occurs most often in test case 2, which involves the GPS functionality. As
stated in the method, will the further investigation of this test case be of its
implementation, package, and area of use.
43
Discussion and conclusions
in their native shell. The specific hardware is in this case the receiver in the
smartphone that communicates with satellites through radio waves to triangulate
the smartphones position. Native apps will have direct access to all the
smartphone’s hardware since they are written in the language specific to the
smartphone’s platform.
The GPS functionality was implemented with a simple npm package in React
Native, which would then fetch the current coordinates of the smartphone. The
implementation for Kotlin was also simple but instead with native’s built-in
functionality for GPS. The reason behind why this change has taken place can be
broken down into two things; React Native and the npm package used. The
functionality can be implemented with a different npm package and from that
change have a different result, for better or worse. This is something that this study
cannot make any further investigation into since it would require an entirely new
method for the new additions to the experiments. The implementation for Kotlin
would be the same to a varying degree depending on the quantity of functionality
since native has a class for accessing GPS functionality. The conclusion to React
Native having the most increases in CPU load in test case 2 compared to Kotlin
resides in that React Native still have more of a hard time accessing specific
hardware (than any other functionality) in a smartphone, such as GPS.
5.3 Conclusions
While the overall results indicate that React Native performs worse than Kotlin it is
worth noting that these differences are not big other than for the CPU performance.
The tests also indicate that differences are depending on which smartphone you
decide to run it on, which is worth considering. Though React Native may have a
worse overall CPU performance, which was 75% of the cases, individual
implementations of functionality are not as high at ~63%.
This leads to the conclusion that React Native will have worse overall performance
than native and that individual functionality implementations do not differ that
much from native. However, it is worth remarking that React Native is more prone
to a negative response in performance when implementing functionality compared
to Kotlin (in our measurements), nonetheless. This would emphasize the choice of
React Native when first starting development, but as the app that is being developed
grows one may consider switching to native. Because at some point due to React
Native’s worse exponential growth in CPU load relative to native (as shown in this
study), it may lead to larger implications.
It was also shown that test case 2 involving the GPS functionality was where React
Native experienced the most increases in CPU load, suggesting that it is at least one
of the areas where hybrid struggles the most. If this is sufficient information to
conclude how to choose between one over the other is entirely subjective and must
be taken into consultation with over development issues.
44
Discussion and conclusions
45
References
6 References
46
References
47
7 Appendices
Appendix 1 Text defining the appendix
Appendix 2 etc.
Appendix 3 All measurements for Huawei Honor 8 from test case 1 for Kotlin.
48
Test
case
1
Hono CPU Battery voltage
r8 User(%) CPU System (%) CPU App (%) Used RAM (MB) Used RAM (%) (V)
1 23 13 2 2015 0,5330687831 4,381
Appendix 4 All measurements for Huawei Honor 8 from test case 2 for Kotlin.
Test case 2
Honor 8 CPU User(%) CPU System (%) CPU App (%) Used RAM (MB) Used RAM (%) Battery voltage (V)
Appendix 5 All measurements for Huawei Honor 8 from test case 3 for Kotlin.
Test case 3
Honor 8 CPU User(%) CPU System (%) CPU App (%) Used RAM (MB) Used RAM (%) Battery voltage (V)
49
Average Average Average Average Average Average
Appendix 6 All measurements for Huawei Honor 8 from test 4 for Kotlin.
Test case 4
Honor 8 CPU User(%) CPU System (%) CPU App (%) Used RAM (MB) Used RAM (%) Battery voltage (V)
1 8 8 2 1874 0,4957671958 4,376
2 9 6 3 1898 0,5021164021 4,376
3 6 9 3 1895 0,5013227513 4,376
Appendix 7 All measurements for Huawei Honor 8 from test case 5 for Kotlin.
Test case 5
Honor 8 CPU User(%) CPU System (%) CPU App (%) Used RAM (MB) Used RAM (%) Battery voltage (V)
1 3 12 3 1942 0,5137566138 4,291
2 15 9 1 1965 0,5198412698 4,219
3 3 13 1 1965 0,5198412698 4,219
4 13 8 2 1919 0,5076719577 4,196
5 11 8 1 1966 0,5201058201 4,196
6 9 7 2 1922 0,5084656085 4,2
7 6 15 1 1969 0,5208994709 4,2
8 10 10 2 1943 0,514021164 4,195
9 13 11 2 1941 0,5134920635 4,191
10 13 9 1 1934 0,5116402116 4,191
11 1 12 2 1934 0,5116402116 4,186
12 10 16 2 1942 0,5137566138 4,186
13 20 6 1 1924 0,508994709 4,274
14 9 11 1 1925 0,5092592593 4,274
15 9 11 4 1927 0,5097883598 4,204
16 16 10 2 1929 0,5103174603 4,125
17 14 12 2 1940 0,5132275132 4,125
18 9 7 2 1965 0,5198412698 4,176
19 11 13 2 1935 0,5119047619 4,2
20 11 8 2 1934 0,5116402116 4,185
21 6 13 2 1935 0,5119047619 4,185
22 12 12 3 1957 0,5177248677 4,219
23 9 15 3 1966 0,5201058201 4,213
24 22 5 1 1967 0,5203703704 4,213
25 6 15 2 1957 0,5177248677 4,211
26 8 8 2 1959 0,5182539683 4,211
27 9 9 2 1960 0,5185185185 4,204
28 11 15 2 1988 0,5259259259 4,19
29 8 15 1 2017 0,5335978836 4,19
30 8 16 2 1990 0,5264550265 4,21
50
31 8 13 1 1971 0,5214285714 4,201
32 6 13 2 1962 0,519047619 4,198
33 12 10 2 1963 0,5193121693 4,198
34 17 4 2 1963 0,5193121693 4,193
35 8 20 2 2016 0,5333333333 4,169
36 10 10 2 1972 0,5216931217 4,169
37 13 8 2 1993 0,5272486772 4,215
38 11 7 2 1979 0,5235449735 4,215
39 8 15 2 1965 0,5198412698 4,223
40 8 14 4 2010 0,5317460317 4,223
Average Average Average Average Average Average
10,15 11,125 1,925 1957,775 0,5179298942 4,202075
Appendix 8 All measurements for Huawei Honor 8 from test case 6 for Kotlin.
Test case 6
Honor 8 CPU User(%) CPU System (%) CPU App (%) Used RAM (MB) Used RAM (%) Battery voltage (V)
51
28,65 18,775 12,15 1941 0,5134920635 4,18525
Appendix 9 All measurements for Huawei Honor 8 from test case 1 for React
Native.
Test case 1
Honor 8 CPU User(%) CPU System (%) CPU App (%) Used RAM (MB) Used RAM (%) Battery voltage (V)
Appendix 10 All measurements for Huawei Honor 8 from test case 2 for React
Native.
Test case 2
Honor 8 CPU User(%) CPU System (%) CPU App (%) Used RAM (MB) Used RAM (%) Battery voltage (V)
Appendix 11 All measurements for Huawei Honor 8 from test case 3 for React
Native.
Test case 3
Honor 8 CPU User(%) CPU System (%) CPU App (%) Used RAM (MB) Used RAM (%) Battery voltage (V)
1 21 16 10 2056 0,5439153439 4,211
2 19 21 9 2072 0,5481481481 4,211
3 18 16 14 2065 0,5462962963 4,21
4 28 13 13 2057 0,5441798942 4,193
5 12 16 16 2059 0,5447089947 4,193
52
6 16 16 12 2070 0,5476190476 4,193
7 18 18 12 2063 0,5457671958 4,193
8 27 8 6 2072 0,5481481481 4,189
9 18 11 11 2068 0,5470899471 4,189
10 15 15 15 2073 0,5484126984 4,189
11 14 14 12 2066 0,5465608466 4,189
12 22 16 15 2071 0,5478835979 4,189
Average Average Average Average Average Average
19 15 12,08333333 2066 0,5465608466 4,19575
Appendix 12 All measurements for Huawei Honor 8 from test case 4 for React
Native.
Test case 4
Honor 8 CPU User(%) CPU System (%) CPU App (%) Used RAM (MB) Used RAM (%) Battery voltage (V)
Appendix 13 All measurements for Huawei Honor 8 from test case 5 for React
Native.
Test case 5
Honor 8 CPU User(%) CPU System (%) CPU App (%) Used RAM (MB) Used RAM (%) Battery voltage (V)
1 25 16 9 1985 0,5251322751 4,116
2 21 11 11 1987 0,5256613757 4,116
3 20 13 13 1989 0,5261904762 4,116
4 22 20 10 1983 0,5246031746 4,057
5 18 16 12 2012 0,5322751323 4,098
6 20 22 4 2007 0,530952381 4,094
7 26 19 14 2006 0,5306878307 4,094
8 23 17 14 2014 0,5328042328 4,108
9 23 21 13 2011 0,532010582 4,109
10 28 15 15 2020 0,5343915344 4,105
11 28 15 13 2011 0,532010582 4,068
12 29 12 14 2022 0,5349206349 4,068
13 29 19 13 2015 0,5330687831 4
14 32 15 11 2023 0,5351851852 4,122
15 33 11 17 2005 0,5304232804 4,107
16 26 16 13 2021 0,5346560847 4,096
17 34 17 17 2027 0,5362433862 4,096
18 24 22 17 2024 0,5354497354 4,114
19 25 22 20 2015 0,5330687831 4,114
20 25 16 22 2019 0,5341269841 4,1
21 25 19 8 2017 0,5335978836 4,077
22 27 17 12 2029 0,5367724868 4,077
53
23 26 20 14 2031 0,5373015873 4,106
24 28 20 13 2035 0,5383597884 4,089
25 23 22 15 2029 0,5367724868 4,102
26 22 21 12 2016 0,5333333333 4,102
27 17 25 10 2016 0,5333333333 4,102
28 26 18 19 2013 0,5325396825 4,078
29 31 16 14 2021 0,5346560847 4,085
30 23 27 10 2026 0,535978836 4,085
31 31 16 15 2024 0,5354497354 4,072
32 25 20 15 2019 0,5341269841 4,072
33 28 18 10 2021 0,5346560847 4,039
34 30 18 13 2023 0,5351851852 4,093
35 19 19 19 2026 0,535978836 4,093
36 25 16 13 2020 0,5343915344 4,109
37 22 20 16 2013 0,5325396825 4,109
38 27 15 11 2016 0,5333333333 4,017
39 26 20 15 2012 0,5322751323 4,1
40 25 21 14 2023 0,5351851852 4,1
Average Average Average Average Average Average
25,425 18,075 13,5 2015,65 0,5332407407 4,093175
Appendix 14 All measurements for Huawei Honor 8 from test case 6 for React
Native.
Test case 6
Honor 8 CPU User(%) CPU System (%) CPU App (%) Used RAM (MB) Used RAM (%) Battery voltage (V)
1 32 23 20 2009 0,5314814815 4,136
2 32 16 19 2038 0,5391534392 4,136
3 42 12 18 2036 0,5386243386 4,094
4 25 20 23 2024 0,5354497354 4,094
5 28 20 14 2038 0,5391534392 4,081
6 28 18 18 2039 0,5394179894 4,081
7 31 14 22 2033 0,5378306878 4,073
8 32 11 14 2034 0,5380952381 4,073
9 27 15 18 2035 0,5383597884 4,034
10 16 23 25 2032 0,5375661376 4,034
11 39 13 23 2035 0,5383597884 4,025
12 36 19 13 2033 0,5378306878 4,039
13 42 14 21 2051 0,5425925926 4,058
14 31 15 25 2065 0,5462962963 4,053
15 36 17 19 2054 0,5433862434 4,053
16 41 20 18 2054 0,5433862434 4,035
17 39 19 19 2050 0,5423280423 4,04
18 27 25 27 2059 0,5447089947 4,088
19 35 18 25 2065 0,5462962963 4,1
20 39 17 25 2064 0,546031746 4,1
21 35 17 23 2042 0,5402116402 4,082
22 46 14 19 2082 0,5507936508 4,082
23 31 19 21 2055 0,5436507937 4,062
24 37 20 22 2050 0,5423280423 4,079
25 37 16 21 2066 0,5465608466 4,079
26 42 19 23 2066 0,5465608466 4,09
27 32 18 25 2061 0,5452380952 4,084
28 25 22 24 2065 0,5462962963 4,084
29 34 23 20 2050 0,5423280423 4,066
30 36 20 24 2057 0,5441798942 4,062
31 34 12 27 2059 0,5447089947 4,062
32 33 22 24 2050 0,5423280423 4,045
33 42 22 23 2061 0,5452380952 4,045
34 38 20 20 2065 0,5462962963 4,074
35 42 11 21 2070 0,5476190476 4,086
36 40 17 22 2057 0,5441798942 4,086
54
37 32 22 22 2059 0,5447089947 4,094
38 36 21 23 2066 0,5465608466 4,094
39 37 19 25 2050 0,5423280423 4,09
40 42 13 21 2062 0,5455026455 4,082
Average Average Average Average Average Average
34,725 17,9 21,4 2051,025 0,5425992063 4,073875
Appendix 15 All measurements for Samsung Galaxy S7 from test case 1 for Kotlin.
Test case 1
Galaxy S7 CPU User(%) CPU System (%) CPU App (%) Used RAM (MB) Used RAM (%) Battery voltage (V)
Appendix 16 All measurements for Samsung Galaxy S7 from test case 2 for Kotlin.
Test case 2
Galaxy S7 CPU User(%) CPU System (%) CPU App (%) Used RAM (MB) Used RAM (%) Battery voltage (V)
Appendix 17 All measurements for Samsung Galaxy S7 from test case 3 for Kotlin
Test case 3
Galaxy S7 CPU User(%) CPU System (%) CPU App (%) Used RAM (MB) Used RAM (%) Battery voltage (V)
1 206 131 94.4 1415 0.3906681391 4.281
2 202 89 84 1429 0.394533407 4.281
3 138 84 37.5 1426 0.3937051353 4.281
4 124 129 65.7 1428 0.3942573164 4.281
55
5 164 145 39.3 1430 0.3948094975 4.279
6 127 112 39.3 1431 0.3950855881 4.279
7 97 94 54.5 1433 0.3956377692 4.279
8 91 94 62.5 1434 0.3959138597 4.279
9 109 94 62.5 1415 0.3906681391 4.279
10 68 100 58 1417 0.3912203203 4.247
11 61 74 61.2 1418 0.3914964108 4.276
12 106 106 58 1419 0.3917725014 4.276
Average Average Average Average Average Average
124.4166667 104.3333333 59.74166667 1424.583333 0.393314007 4.2765
Appendix 18 All measurements for Samsung Galaxy S7 from test case 4 for Kotlin.
Test case 4
Galaxy S7 CPU User(%) CPU System (%) CPU App (%) Used RAM (MB) Used RAM (%) Battery voltage (V)
Appendix 19 All measurements for Samsung Galaxy S7 from test case 5 for Kotlin.
Test
case 5
Galaxy CPU System
S7 CPU User(%) (%) CPU App (%) Used RAM (MB) Used RAM (%) Battery voltage (V)
56
21 84 74 38.7 1500 0.4141358366 4.331
Appendix 20 All measurements for Samsung Galaxy S7 for test case 6 for Kotlin
Test case 6
Gaxy S7 CPU User(%) CPU System (%) CPU App (%) Used RAM (MB) Used RAM (%) Battery voltage (V)
1 153 138 150 1505 0.4155162893 4.29
2 176 136 66.6 1523 0.4204859194 4.301
3 169 125 65 1544 0.4262838211 4.291
4 186 125 65.6 1543 0.4260077305 4.286
5 186 125 65.6 1573 0.4342904473 4.288
6 186 121 93.1 1533 0.423246825 4.287
7 141 117 72.4 1530 0.4224185533 4.282
8 171 119 65.5 1534 0.4235229155 4.28
9 161 119 61.2 1539 0.4249033683 4.278
10 177 106 74.1 1542 0.42573164 4.271
11 169 116 59.3 1546 0.4268360022 4.276
12 172 134 62.5 1526 0.4213141911 4.276
13 168 126 61.2 1530 0.4224185533 4.273
14 194 129 61.2 1535 0.4237990061 4.271
15 181 106 64.5 1550 0.4279403644 4.27
16 178 128 75 1563 0.4315295417 4.269
17 156 116 62.5 1565 0.4320817228 4.264
18 159 128 71.8 1546 0.4268360022 4.266
19 193 143 78.5 1569 0.433186085 4.264
20 188 97 65.6 1565 0.4320817228 4.263
21 168 116 64.5 1562 0.4312534511 4.259
22 159 119 71.8 1566 0.4323578134 4.256
23 177 106 65.5 1569 0.433186085 4.261
24 163 91 68.7 1550 0.4279403644 4.259
25 139 129 74.1 1552 0.4284925456 4.262
26 148 126 61.2 1555 0.4293208172 4.261
27 124 112 69.6 1558 0.4301490889 4.261
28 181 106 61.2 1562 0.4312534511 4.256
29 188 116 65.6 1569 0.433186085 4.261
30 200 116 65.6 1551 0.428216455 4.261
31 142 103 61.2 1552 0.4284925456 4.256
32 158 126 61.2 1557 0.4298729983 4.249
33 184 129 61.2 1562 0.4312534511 4.251
57
34 161 90 61.2 1565 0.4320817228 4.246
35 172 128 65.6 1568 0.4329099945 4.25
36 229 118 71.4 1622 0.4478188846 4.244
37 190 126 58 1555 0.4293208172 4.245
38 168 116 61.2 1560 0.43070127 4.246
39 148 158 80.6 1571 0.4337382662 4.246
40 153 119 62.5 1559 0.4304251795 4.246
Average Average Average Average Average Average
170.4 120.1 68.8275 1553.15 0.4288100497 4.26555
Appendix 21 All measurements for Samsung Galaxy S7 for test case 1 for React
Native.
Test case 1
Galaxy S7 CPU User(%) CPU System (%) CPU App (%) Used RAM (MB) Used RAM (%) Battery voltage (V)
Appendix 22 All measurements for Samsung Galaxy S7 for test case 2 for React
Native.
Test case 2
Galaxy S7 CPU User(%) CPU System (%) CPU App (%) Used RAM (MB) Used RAM (%) Battery voltage (V)
1 115 145 75.7 1724 0.4759801215 4.316
2 128 131 56.2 1732 0.4781888459 4.28
3 210 65 338 1726 0.4765323026 4.278
4 81 74 29 1728 0.4770844837 4.251
5 210 139 29 1729 0.4773605743 4.251
6 80 160 33.3 1721 0.4751518498 4.243
7 244 159 28.1 1725 0.476256212 4.269
8 155 145 38.7 1720 0.4748757592 4.269
9 57 127 40 1734 0.4787410271 4.269
10 142 84 29 1738 0.4798453893 4.236
11 78 84 28.1 1736 0.4792932082 4.246
12 70 113 30 1732 0.4781888459 4.265
Average Average Average Average Average Average
Appendix 23 All measurements for Samsung Galaxy S7 for test case 3 for React
Native.
58
Test case 3
Galaxy S7 CPU User(%) CPU System (%) CPU App (%) Used RAM (MB) Used RAM (%) Battery voltage (V)
Appendix 24 All measurements for Samsung Galaxy S7 for test case 4 for React
Native.
Test case 4
Galaxy S7 CPU User(%) CPU System (%) CPU App (%) Used RAM (MB) Used RAM (%) Battery voltage (V)
Appendix 24 All measurements for Samsung Galaxy S7 for test case 5 for React
Native.
Test case 5
Galaxy S7 CPU User(%) CPU System (%) CPU App (%) Used RAM (MB) Used RAM (%) Battery voltage (V)
1 84 61 38.7 1775 0.4900607399 4.203
2 103 93 33.3 1773 0.4895085588 4.213
3 242 93 33.3 1781 0.4917172833 4.15
4 200 109 348 1785 0.4928216455 4.212
5 113 103 33.3 1779 0.4911651022 4.202
6 97 81 25.8 1775 0.4900607399 4.205
7 207 177 43.3 1773 0.4895085588 2.14
8 177 163 43.3 1780 0.4914411927 4.216
9 103 116 22.5 1787 0.4933738266 4.213
10 170 150 30 1792 0.4947542794 4.202
59
11 150 110 26.6 1794 0.4953064605 4.203
12 167 153 30 1780 0.4914411927 4.215
13 107 120 26.6 1800 0.4969630039 4
14 97 103 26.6 1799 0.4966869133 4.214
15 147 178 50 1785 0.4928216455 4.211
16 147 193 36.6 1792 0.4947542794 4.207
17 178 97 50 1795 0.4955825511 4.189
18 87 119 16.1 1792 0.4947542794 4.206
19 157 157 43.3 1795 0.4955825511 4.212
20 107 97 30 1792 0.4947542794 4.208
21 133 143 26.6 1806 0.4986195472 4.196
22 113 130 30 1792 0.4947542794 4.208
23 187 129 48.3 1806 0.4986195472 4.196
24 134 159 53.1 1816 0.5013804528 4.207
25 120 87 26.6 1780 0.4914411927 4.202
26 123 133 30 1796 0.4958586416 4.209
27 119 156 25 1800 0.4969630039 4.215
28 180 120 53.3 1799 0.4966869133 4.214
29 210 127 50 1813 0.5005521811 4.207
30 103 94 28.1 1810 0.4997239094 4.209
31 178 172 34.3 1804 0.4980673661 4.187
32 153 153 53.1 1814 0.5008282717 4.2
33 193 153 50 1801 0.4972390944 4.195
34 328 131 50 1819 0.5022087245 4.197
35 172 103 43.7 1806 0.4986195472 4.195
36 233 213 56.6 1805 0.4983434567 4.197
37 237 150 43.3 1802 0.497515185 4.207
38 177 190 53.3 1813 0.5005521811 4.195
39 153 147 56.6 1805 0.4983434567 4.203
40 183 193 53.3 1787 0.4933738266 4.2
Average Average Average Average Average Average
156.725 133.9 46.3125 1794.95 0.4955687465 4.151875
Appendix 25 All measurements for Samsung Galaxy S7 for test case 5 for React
Native.
Test case 6
Galaxy S7 CPU User(%) CPU System (%) CPU App (%) Used RAM (MB) Used RAM (%) Battery voltage (V)
60
19 243 203 80 1856 0.5124240751 4.239
Appendix 26 All calculations for performance difference for each test case.
Honor 8 Test Case Avg. Kotlin CPU APP (%) Avg. React Native CPU APP (%) Difference (pp)
1 2.25 10 7.75
2 1.9 12.1 10.2
3 1.8 12 10.2
4 2.4 14.9 12.5
5 1,925 13.5 11,575
6 12.15 21.4 9.25
Honor 8 Test Case Avg. Kotlin CPU USER (%) Avg. React Native CPU USER (%) Difference (pp)
1 11.8 18 6.2
2 13.9 14 0.1
3 11.5 19 7.5
4 9.5 21.3 11.8
5 10.15 24.425 14.275
6 28.65 34.725 6.075
Honor 8 Test Case Avg. Kotlin CPU SYSTEM (%) Avg. React Native CPU SYSTEM (%) Difference (pp)
1 12.5 12.08 -0.42
2 12.9 12.33 -0.57
3 13.6 15 1.4
4 10.5 14.6 4.1
5 11.125 18.075 6.95
6 18.775 17.9 -0.875
Galaxy S7 Test Case Avg. Kotlin CPU APP (%) Avg. React Native CPU APP (%) Difference (pp)
1 70 47.45 -22.55
2 59.66 62.925 3.265
3 59.7 50.525 -9.175
4 58 37.875 -20.125
5 51.425 46.312 -5.113
6 68.8275 93.325 24.4975
Galaxy S7 Test Case Avg. Kotlin CPU USER (%) Avg. React Native CPU USER (%) Difference (pp)
1 90.9 60 -30.9
2 108.667 130 21.333
3 124.4 169.25 44.85
4 98.25 192.83 94.58
5 99.25 156.725 57.475
6 170.4 272.775 102.375
Galaxy S7 Test Case Avg. Kotlin CPU SYSTEM (%) Avg. React Native CPU SYSTEM (%) Difference (pp)
1 94 61.75 -32.25
2 98 118.83 20.83
3 104 145.48 41.48
4 87.66 158.6 70.94
5 83.775 133.9 50.125
6 120.1 173.526 53.426
61
Appendix 27 All calculations for performance difference between test cases.
Honor 8 Test cases Kotlin CPU APP (pp) React Native CPU APP (pp) Kotlin/React Native difference (pp)
diff 1–2 -0.35 2.1 2.45
diff 2–3 -0.1 -0.1 0
diff 3–4 0.6 2.9 2.3
dif 4–5 -0.475 -1.4 -0.925
diff 5–6 10.225 7.9 -2.325
Honor 8 Test cases Kotlin CPU USER (pp) React Native CPU USER (pp) Kotlin/React Native difference (pp)
diff 1–2 2.1 -4 -6.1
diff 2–3 -2.4 5 7.4
diff 3–4 -2 2.3 4.3
dif 4–5 0.65 3.125 2.475
diff 5–6 18.5 10.3 -8.2
Honor 8 Test cases Kotlin CPU SYSTEM (pp) React Native CPU SYSTEM (pp) Kotlin/React Native difference (pp)
diff 1–2 0.4 0.25 -0.15
diff 2–3 0.7 2.67 1.97
diff 3–4 -3.1 -0.4 2.7
dif 4–5 0.625 3.475 2.85
diff 5–6 7.65 -0.175 -7.825
Galaxy S7 Test cases Kotlin CPU APP (pp) React Native CPU APP (pp) Kotlin/React Native difference (pp)
diff 1–2 -10.34 15.475 25.815
diff 2–3 0.04 -12.4 -12.44
diff 3–4 -1.7 -12.65 -10.95
dif 4–5 -6.575 8.437 15.012
diff 5–6 17.4025 47.013 29.6105
Galaxy S7 Test cases Kotlin CPU USER (pp) React Native CPU USER (pp) Kotlin/React Native difference (pp)
diff 1–2 17.767 70 52.233
diff 2–3 15.733 39.25 23.517
diff 3–4 -26.15 23.58 49.73
dif 4–5 1 -36.105 -37.105
diff 5–6 71.15 116.05 44.9
Galaxy S7 Test cases Kotlin CPU SYSTEM (pp) React Native CPU SYSTEM (pp) Kotlin/React Native difference (pp)
diff 1–2 4 57.08 53.08
diff 2–3 6 26.65 20.65
diff 3–4 -16.34 13.12 29.46
dif 4–5 -3.885 -24.7 -20.815
diff 5–6 36.325 39.626 3.301
62