vii
PENERAPAN CODE REFACTORING UNTUK ANALISIS PERFORMA APLIKASI MOBILE
Nama Mahasiswa : Reynaldi Febriansyah
NIM : 6304181145
Dosen Pembimbing : Depandi Enda, M.Kom
Abstrak
Terdapat berbagai tahap dalam pengembangan aplikasi mobile android.
Refactoring adalah salah satu tahapan yang penting dalam pengembangan suatu aplikasi. Refactoring berfungsi memudahkan pengembang dalam membaca kode untuk melakukan maintenance atau pemeliharaan aplikasi. Yang dimaksud refactoring adalah proses memperbaiki struktur kode yang dinilai kurang baik yang dapat memunculkan berbagai masalah dalam tahapan pemeliharaan aplikasi.
Struktur kode yang dinilai kurang baik tersebut biasanya disebut sebagai code smell. Code smell terbagi menjadi beberapa kategori seperti Bloaters, Object Orientation Abuser, Preventers, Dipensaser dan Couplers. Penelitian ini difokuskan pada kategori Bloaters, Bloaters sendiri adalah kode, method maupun kelas yang terlalu banyak atau besar oleh karena itu sulit untuk dikerjakan.
Penerapan refactoring pada penelitian ini akan dilakukan pada aplikasi open source yang menggunakan bahasa pemrograman kotlin sebagai bahasa utamanya.
Aplikasi yang sudah diterapkan refactoring akan dianalisis performanya untuk membuktikan seberapa besar pengaruh refactoring terhadap performa aplikasi mobile. Penelitian yang telah dilakukan memperlihatkan bahwa execution time dan CPU usage mengalami penurunan performa setelah refactoring sedangkan memory usage mengalami peningkatan. Hasil menunjukkan execution time menurun sekitar 7-19%, CPU usage menurun 7% dan memory usage meningkat sekitar 3-7%.
Kata Kunci: Refactoring, Analisis Performa, Code Smell, Kotlin, Android
viii
IMPLEMENTATION OF CODE REFACTORING FOR MOBILE APPLICATION PERFORMANCE
ANALYSIS
Student Name : Reynaldi Febriansyah Studnent ID Number : 6304181145
Name of Advisor : Depandi Enda, M.Kom
Abstract
There are various stages in the development of Android mobile applications. Refactoring is one of the important stages in the development of an application. Refactoring functions to make it easier for developers to read code to perform maintenance or application maintenance. What is meant refactoring is the process of improving the code structure that is considered unfavorable which can lead to various problems in the application maintenance stage. The code structure that is considered unfavorable is usually referred to as a code smell.
Code smell is divided into several categories such as Bloaters, Object Orientation Abuser, Preventers, Dipensaser and Couplers. This research is focused on the Bloaters category .Bloaters themselves are too many or too many or too large code, methods or classes, therefore it is difficult to work with. The application of refactoring in this study will be carried out on open source that use the Kotlin programming language as the main language. Applications that have been refactored will be analyzed for their performance to prove how much influence refactoring on the performance of mobile applications. Research that has been done shows that execution time and CPU usage experience a decrease in performance after refactoring, while memory usage increases. The results showed that execution time decreased by around 7-19%, CPU usage decreased by 7%
and memory usage increased by around 3-7%.
Keywords: Refactoring, Performance Analytics, Code Smell, Kotlin, Android