MGMLaboratory
Back

Menu

01Home
02About Us
03Projects
04Publications
05Member
06Articles
07Contact

Let's Talk

Open in Mail app

Socials

Malang (ID) --:--Privacy PolicyTerms of Service

January 1, 20232 min read

GetX vs Riverpod: Measuring Two Flutter State ManagersGetX vs Riverpod: Measuring Two Flutter State Managers

A benchmark on a real marketplace app finds a gap in memory and speed, but not in processor load.

  • Journal
  • Publications

Written by

  • SRShirasaka RenIT & Infrastructure · Student Member

In this article

  1. 01What was measured
  2. 02The results

Flutter developers face a decision early in every project: how should the app manage its state? Two libraries dominate the conversation, and they take opposite approaches. GetX bundles state, routing and dependency injection into one package. Riverpod splits concerns and leans on providers. Both are popular, and until recently there was little head to head measurement on a realistic app.

Application code under measurement. Image: Markus Spiske, CC0, via Wikimedia Commons.
Fig. 01Application code under measurement. Image: Markus Spiske, CC0, via Wikimedia Commons.

A team set out to compare them properly. Instead of a toy example, they used Flutter ecommerce, an open source marketplace application available on GitHub. That choice matters, because marketplace apps carry the workloads that state managers struggle with: product lists, images, filters and search.

01/02

What was measured

The team ran the same three features under both libraries and recorded three numbers for each: memory usage, execution time and processor utilisation.

  • Displaying the home screen, the first thing a user sees and the heaviest screen to build.
  • Search, which fires repeated queries and rebuilds results as the user types.
  • Adding an item, which writes to the cart and updates several parts of the interface at once.
A mobile development session. Image: Thamizhpparithi Maari, CC BY-SA 4.0, via Wikimedia Commons.
Fig. 02A mobile development session. Image: Thamizhpparithi Maari, CC BY-SA 4.0, via Wikimedia Commons.

02/02

The results

Across the three features and the scenarios tested, memory usage and execution time differed. GetX used less memory and finished faster. The processor numbers told a different story: there was no meaningful difference between the two libraries on that measure.

The split is the interesting part. If one library had won on every axis, the choice would be simple. Instead, the result points to a trade off between how often a state manager rebuilds parts of the interface and how much raw work it asks the processor to do.

The authors draw a practical conclusion: GetX came out ahead on memory and speed in this test. That is a narrow claim, tied to one application and one set of features, and the paper presents it as such. It is still more than most teams have when they make the choice, which is usually based on documentation, community size and personal preference.

Source

  1. Jatnika, Akbar and Pinandito (2023). Comparative Analysis of the Use of State Management in E-commerce Marketplace Applications Using the Flutter Framework. Journal of Information Technology and Computer Science.

    DOI10.25126/jitecs.202382557 (opens in a new tab)

Next articleWhat Survives the Move From Paper to a VR Headset(Keep scrolling)(Read it next)(Loading)