A frame-time benchmark of Una against a standard Flutter Material app. One app builds the same screen five ways and plays the same scripts in each:
| Mode | What it is |
|---|---|
| Material | MaterialApp, Material 3: Scaffold, SliverAppBar.large, Card, ActionChip, TextButton, NavigationBar, AlertDialog, showModalBottomSheet, MenuAnchor, Tooltip. |
| Una | UnaApp on the default look with Liquid Glass off (LiquidGlassMode.never): una's frosted bars, popovers and sheets. |
| Una Liquid Glass | The same app with Liquid Glass on: LiquidGlassMode.auto on iOS and macOS, as an app gets it (in a phone's browser a sheet is then solid), always elsewhere. On iOS this is the premium shader tier; in a browser, the package's standard tier. |
| Una, blur behind overlays | Una with the page behind dialogs and sheets blurred in a phone's browser too (UnaDialogTheme(barrierBlurInMobileBrowser: true)), as before una left that blur out there. Anywhere else it is the same as Una. |
| Una, no glass | Una with no backdrop filter anywhere: the style's glass has no blur and bars, popovers, menus and tooltips are their colour at full opacity. What a fallback for a slow device would switch to. |
- Scrolling feed: 300 posts (avatar, text, a 4:3 photo, chips and
action buttons) in a lazy
SliverListunder a pinned large app bar and a bottom bar. The script scrolls at 2000 pt/s for 6 s, flings, scrolls back and flings again: about 11 s, the same distances and curves in every mode. - Overlays: over the feed (scrolled so photos are under the bars), opens and closes a dialog, a bottom sheet, the app bar's menu and a tooltip, twice.
In a browser every run has a page of its own: the app reloads before each mode and scenario and carries the run on in the tab's session storage. CanvasKit keeps the GPU programs it has compiled for as long as the page lives, and Safari compiles them slowly, so in one page the first mode paid for the first use of every blur and the modes after it did not. Each mode now pays its own, as a visitor opening the app would.
Every photo is decoded at the same size in every mode and precached before a scenario starts, so the libraries are compared, not the image cache. Text uses the platform font everywhere.
Before a run the app asks for a frame on every vsync for about a second and measures the gaps: the refresh rate it really gets, which sets the frame budget. The platform's own figure is a constant 60 on the web, and a browser or an iPhone in Low Power Mode may give less than the display can. Safari caps pages at 60 Hz unless its "Prefer Page Rendering Updates near 60fps" feature flag is off; Chrome follows the display.
What reached the screen, from the frames' own vsync stamps, GPU included:
- FPS: frames shown per second while something moved.
- Dropped: vsyncs that showed no new frame after a frame that asked for the next one. A frame the GPU is still drawing holds back the next vsync, so this is the render cost the raster time cannot show on the web.
The engine's FrameTiming, CPU time:
- Build: UI-thread time (build, layout, paint).
- Raster: raster-thread time (on the web, until commands reach the GPU).
- Missed (CPU): frames whose build or raster took longer than one refresh: Flutter's own definition of jank.
Before the scenarios, a device probe draws one screen of content and reads it back, then the same with a full-screen backdrop blur over it (sigma 20, the default look's glass): the difference is what one blur costs the GPU. In a browser it also records what the page can learn about the device (user agent, core count, memory, the WebGL renderer's name). Runs on old and new phones side by side show whether any of it predicts the dropped frames, which is what an automatic fallback from glass would need to know before the first animation.
The overlays are also reported one by one: the worst frame the first time each opened and the second, and the frames dropped. A cost paid once (a shader compiled the first time a surface is shown) stands out there.
With several rounds, the modes run in alternating order and the frames of all rounds are pooled.
Numbers only mean something in a profile or release build on a real device. A debug build (and the iOS Simulator only runs debug builds) shows that the scripts work, not how fast anything is.
flutter run --profile -d <iPhone>Tap Run benchmark, or start it right away:
flutter run --profile -d <iPhone> --dart-define=AUTORUN=trueThe results show in the app (Copy JSON copies them) and are printed to
the log as numbered UNA_PERF_RESULT 1/n … lines (iOS cuts a log line off at
about a kilobyte); join the pieces in order. In a browser, ?autorun=1 starts
a run on load.
iOS runs at 120 Hz on a ProMotion iPhone because Info.plist sets
CADisableMinimumFrameDurationOnPhone.
una comes from git (main). To run against a local checkout beside this
one, add a pubspec_overrides.yaml (gitignored):
dependency_overrides:
una:
path: ../unathen run flutter pub get.
https://performance.unakit.dev/ is the web build, deployed to GitHub Pages
by .github/workflows/deploy-pages.yaml on every push to main. The custom
domain is set in the repository's Pages settings.
Photographs: see assets/images/README.md.