The application contains a list of 100 statically created objects, clicking on an item in the list causes an animated transition to the detail screen. When entering the detail screen, the image frame rotates for two seconds. When the user scrolls the text, the photo and the text moves at the same time, the background shrinks and a button appears.
.
├── shared # Shared code (Jetpack-Compose & XML).
├── compose # Jetpack-Compose UI code.
│ └── benchmark # Macrobenchmark Compose.
├── xml # XML UI code.
│ └── benchmark # Macrobenchmark XML.
├── app_flutter # Flutter module.
│ └── lib # Flutter source code.
│ └── integration_test # Flutter Integration tests.
└── tests # Test Results and Scripts.
All tests were performed on a physical device.
- Physical Device: Samsung Galaxy A52
- OS: Android 13 (API 33)
- RAM: 6 GB
- CPU-Cores: 8
The scroll tests were run five times and the results are based on the data from the five tests.
Macrobenchmark tests were written for XML & Jetpack-Compose to get frame timing data while scrolling the list:
The integration test was written for Flutter.
After running the test for Flutter, a file with various performance data in JSON
format was obtained. Then, using Python script, the value of frame_rasterizer_times
was taken and the average value in each presentile [50,90,95,99] was calculated from the results of five tests.
Tests to obtain application startup time data were performed five times.
Macrobenchmark tests were written to obtain the startup time for XML & Jetpack-Compose app:
The cold startup type was taken for comparison.
The startup time of the Flutter application was obtained using a command in the terminal:
flutter run --trace-startup --profile
This command is required to measure the startup time of the app.
An JSON file was obtained and the value timeToFirstFrameRasterizedMicros
was taken. The tests were run five times and calculated the
maximum, minimum and median startup time of the app.
The script was written and the tests were run ten times on a physical device.
Using the Flashlight
library, application performance data, average FPS, CPU, RAM and an overall score on a scale of 100 were obtained.
the values are presented in milliseconds.
Percentile | XML | Jetpack-Compose | Flutter |
---|---|---|---|
p50 | 5.2 | 7.6 | 5.2 |
p90 | 6.6 | 12.0 | 7.1 |
p95 | 7.0 | 14.8 | 8.6 |
p99 | 7.7 | 23.3 | 48.18 |
the values are presented in megabytes.
Flutter | Jetpack-Compose | XML |
---|---|---|
13 Mb | 12.7 Mb | 5.5 Mb |
the values are presented in milliseconds.
XML | Jetpack-Compose | Flutter | |
---|---|---|---|
min | 670.8 | 570.5 | 337 |
median | 707.5 | 591.1 | 395.9 |
max | 729.1 | 620.2 | 502.6 |