Performance Analysis of BLoC and Provider State Management Library on Flutter - Regawa Rama Prayoga; Alifia Syalsabila; Ghifari Munawar; Rahil Jumiyani (Jurnal Mantik, 2021)
A proper choice of state management library can increase the performance of the Flutter for Android application development. BLoC and Provider are the most popular state management libraries nowadays. Unlike setState, which rebuilds all widgets, the state management library allows apps to rebuild only those widgets that have state changes. However, it is not known yet how much it increased the performance by using BLoC or Provider as a state management library. This study focused on the effect of using state management libraries on the widget build process in Flutter. It was conducted by developing setState, BloC, and Provider. The performance was measured by CPU utilization, memory usage, and execution time. Experimental results show that applications that use BLoC result in (1) CPU utilization of 0.45% (2.14% more efficient), (2) memory usage of 23.27 MB (8.19% more efficient), and (3) execution time of 3.54 seconds (16.36% more efficient). The application that uses Provider results in (1) CPU utilization 0.54% (2.57% more efficient), (2) memory usage of 32.01 MB (11.27% more efficient), and (3) execution time of 4.10 seconds (19.44% more efficient). However, it should be noted that these results occur when BLoC and Provider are implemented in the leaf widget.