All posts

Benchmarking GUI Frameworks

A comprehensive and fair GUI benchmark, using a Wayland compositor.

20 min read
  • ui
  • rust
  • benchmarks
  • wayland
  • gpui
On this page

A little while ago I published A Critique of GPUI,1 making an architectural argument about UI state models backed by a quick, unpublished benchmark harness. A fair question kept coming back: where do these numbers actually come from?

The honest answer was “from inside each framework,” which is a bad place to measure a GUI. Every toolkit has its own convenient definition of when a frame is done: one stops after layout, another after recording draw calls, another after handing a buffer to the GPU. I tried to line those stopping points up by hand, but I’m not confident I always got it right.

So I threw out the internal timers and built a Wayland compositor instead.

Each framework now runs unmodified against fakeland,2 a headless compositor that pretends to be a 1280×800 Dell monitor at 144 Hz. It injects real pointer, keyboard, and scroll events, waits for the app to commit a buffer, waits for the GPU fence to signal, and checks whether the pixels actually changed. From the app’s point of view, it’s running on a normal desktop. It has no idea it’s being measured.

Everything is public:

The setup in 30 seconds

I built the same fake analytics dashboard in nine GUI stacks: zgui, GPUI (via gpui-component), Freya, Vizia, Floem, Iced, egui, Dioxus Native, and Tauri + SolidJS as a web reference, plus opt-in tuned variants (GPUI cached, gpui-fast,4 Iced lazy, and Dioxus Skia), for thirteen binaries in total. Every base app is written the idiomatic way each framework’s docs recommend, without hand-rolled optimizations.

The benchmark app at 30 rows
The benchmark app at 30 rows, implemented idiomatically in each framework.

To see how architectures scale, the table and message feed hold 30, 300, 1,000, or 3,000 real, non-virtualized rows (~558 to ~33,000 live elements).

Before you say “nobody builds a 3,000-row table without a virtual list”—you’re right, and a second scenario tests each framework’s virtual list up to a million rows. The unvirtualized table isn’t modeling a table; it’s a convenient stand-in for dense, non-uniform UIs that you can’t just virtualize, like a DAW, a video timeline, a shader graph, or a complex inspector. For scale, Zed’s team describes a typical Zed window as having “tens of nodes and a few thousand elements,”5 which puts the 300-row build (~3,500 elements) right around a realistic small desktop app.

The big picture

The numbers below measure response time: from the moment the compositor sends an input event until the GPU finishes drawing the buffer that reacts to it (the wait for the next monitor refresh is excluded since that depends on when the input happened to land, not how fast the framework is). As a reference, the budget for one frame is 6.9 ms at 144 Hz and 16.7 ms at 60 Hz.

Before digging into individual interactions, here is the whole suite in one picture. It shows how large the app can grow before an interaction misses its frame budget:

Framework
zgui≥ 33k≥ 33k≥ 33k8.5k< 55813k2.1k828< 558< 558≥ 33k≥ 33k≥ 33k
GPUI1.5k1.2k1.2k1.3k1.2k1.1k1k1k< 558< 558< 3.5k< 3.5k< 558
GPUI (fast)3.6k≥ 33k≥ 33k1.9k2.8k3.1k1.8k1.5k1.1k1.1k< 3.5k< 3.5k558
GPUI (cached)1.4k≥ 33k2.3k9611.4k1.4k1k1.1k1.1k1k< 3.5k< 3.5k3.5k
Freya≥ 33k≥ 33k9.3k17k< 5586.3k2k910< 558< 558≥ 11k≥ 11k≥ 11k
Vizia1.1k13k569< 558< 558< 558< 558< 558< 558< 558< 3.5k< 3.5k< 558
Floem15k20k< 558< 558< 558< 558< 558< 558< 558< 5583.5k3.5k3.5k
Iced≥ 33k≥ 33k16k13k4.1k< 5585.3k6.3k< 558< 558≥ 33k≥ 33k11k
Iced (lazy)≥ 33k≥ 33k27k20k1.3k< 5584.6k6.5k2k< 558≥ 33k≥ 33k≥ 33k
egui6.3k5.6k< 5581.9k< 5581.8k< 5583.2k< 558< 5583.5k3.5k3.5k
Dioxus16k16k13k< 558< 558< 558< 558862< 558< 55811k11k11k
Dioxus (Skia)19k18k18k< 558< 558< 558< 558954< 558< 55811k11k11k
Tauri + Solid≥ 33k≥ 33k< 5589.2k≥ 33k< 558< 558< 558< 558< 558< 3.5k< 3.5k< 558

< min 558 2k 6k ≥ 33kexplorer ↗

Element counts up to which an interaction stays within one frame (95th percentile response time, or ≤ 1% missed refreshes for scrolling and animation). Click a column header to rank frameworks.

You can read almost the entire story off that grid (find the raw table and data in the explorer). Instead of reciting every cell, here are the five things that actually stood out.

1. At demo size, everything is fast

At 30 rows (558 elements), every single framework launches in under half a second (221 ms to 443 ms) and responds to a hover in under 4 ms (0.7 ms to 3.7 ms). That’s why “I tried it and it felt snappy” doesn’t really tell you a whole lot: small apps hide every architectural difference.

The one weird outlier at 30 rows is Tauri, which keeps committing 43 frames per second while completely idle, burning 88 ms of CPU every idle second (every native stack sits between 0.9 and 4.1 ms/s).

Virtual lists tell a similar story: at one million rows, hover takes 0.7 ms (zgui) to 2.8 ms (Tauri), memory stays flat, every framework hits 0% missed refreshes on a glide, and every native stack except zgui (1.4%) hits 0% on a fling. If the heavy part of your app is a uniform list, use a virtual list and stop worrying. The interesting differences only start once you have thousands of live elements on screen at once.

2. Hover and scroll: the 144 Hz cliff

Hovering a table row changes one background color—about as small as a UI update gets. Scrolling is the sustained version: if a framework takes 8 ms per frame on a 144 Hz display (6.9 ms budget), it only misses the budget by 15%, yet it drops straight to 72 fps because every other refresh goes empty (depending on frame pacing logic).

FrameworkHover @ 3.5kHover @ 33kSlope / 1k elemsMissed refreshes (144 Hz glide: 300 / 1k / 3k rows)
zgui0.8 ms1.7 ms0.03 ms0% / 0% / 0%
Iced1.4 ms3.2 ms0.06 ms0% / 0% / 0%
Freya1.9 ms5.1 ms0.11 ms0% / 0% / —
Tauri + Solid3.1 ms4.3 ms0.03 ms25% / 28% / 26%
Floem2.7 ms7.6 ms0.16 ms0% / 44% / 80%
Dioxus Native3.6 ms10.8 ms0.24 ms0% / 0% / 31%
egui4.0 ms25.4 ms0.72 ms0% / 50% / 75%
GPUI (gpui-fast)6.4 ms55.5 ms1.64 ms15% / 67% / 89%
GPUI11.7 ms118.9 ms3.57 ms50% / 83% / 94%
Vizia17.4 ms182.0 ms5.50 ms93% / — / —

(Medians over 30–50 runs. Dashes mean the runner stopped earlier after a response exceeded one second.)

Three very different categories emerge here:

  • Nearly flat (zgui, Freya, Tauri). Fine-grained reactivity pays off: hovering runs one closure or component and repaints one row. What little growth remains comes from engine passes that still touch the whole tree. Tauri has one of the flattest slopes alongside a higher baseline (3.1–4.3 ms hover, 9–10 ms keystroke), and its flat ~26% missed refreshes might come from WebKitGTK doing weird things on Wayland + NVIDIA (my desktop is a worst case for Tauri and doesn’t say anything about macOS or Windows).
  • Predictably linear (egui). egui runs all UI code every frame, adding 0.72 ms per thousand elements regardless of what changed. At 33k elements, hovering a row (25.4 ms) costs the same as sorting the entire table (25.8 ms). You can literally see the 144 Hz cliff in its scroll column: 0% missed at 300 rows, then straight to 50% at 1,000 rows as frame time crosses 6.9 ms. At 60 Hz, 1,000 rows still scrolls without dropping a frame.
  • Steeply linear (GPUI, Vizia). Stock GPUI hits 11.7 ms for a hover at 3.5k elements and already misses half its refreshes while scrolling—effectively turning it into a 60 Hz framework at Zed-sized UIs (at 60 Hz, 300 rows scrolls cleanly, while 1,000 rows misses 66%). Zed feels smooth because its heavy surface, the editor, is a custom element that bypasses this path. Even gpui-fast drops 15% of refreshes at 300 rows and 67% at 1,000 rows on the 144 Hz glide (and 49% at 1,000 rows at 60 Hz).

3. GPUI’s view boundary, in two numbers

The tuned GPUI builds directly test a claim from my first post: that the smallest unit GPUI can reuse is a view. In the cached build, the sidebar, top bar, metric cards, and table are each separate cached views. Compare hovering two items at 33k elements:

Hover at 33k elementsGPUIcachedgpui-fast
Nav item in the sidebar118.9 ms6.0 ms4.9 ms
Row in the table118.9 ms118.9 ms55.5 ms

Hovering the sidebar gets 20× faster because the table sits behind a separate view cache. Hovering a row inside the table gets no speedup at all, because a row isn’t a view. To fix that, every row has to become its own entity with its own Render impl, which is the manual signal graph I complained about last time. gpui-fast retains more between frames, cutting row hover roughly in half and dropping search typing from 79.2 ms to 6.2 ms, which is real progress. But the view boundary still dictates where the speedup stops.

4. Retained state can be expensive

If small updates favor retained, fine-grained frameworks, creating and destroying lots of UI flips the leaderboard upside down. Clicking “Messages” replaces 3,000 table rows with 3,000 message cards; typing z in search hides every row, and pressing backspace brings them all back.

FrameworkPage switch @ 3.5k (there / back)Search @ 33k: hide allSearch @ 33k: restore allRAM added per row
egui7 / 8 ms2 ms45 ms~19 KB
Iced9 / 10 ms12 ms30 ms~22 KB
GPUI11 / 12 ms8 ms143 ms~71 KB
Freya18 / 18 ms59 ms2,732 ms~82 KB
zgui24 / 26 ms36 ms239 ms~79 KB
Tauri + Solid25 / 25 ms28 ms184 ms~35 KB
Dioxus Native26 / 27 ms33 ms195 ms~50 KB
Floem136 / 127 ms200 ms1,352 ms376 KB (1.3 GB total)

Here, egui takes first place, with Iced and GPUI right behind, while the retained frameworks pay noticeably more: zgui lands in the middle alongside Tauri and Dioxus at 24–26 ms for a 3.5k-element page switch (about two frames at 60 Hz and four at 144 Hz).

There is a real setup and teardown cost to retaining state. Before drawing the first frame of a new page, a retained signal framework has to construct elements, style entries, layout nodes, and signal subscriptions for every row, and tear them down when they disappear. egui doesn’t retain much, so hiding 3,000 rows makes the next frame almost free (2 ms) and bringing them back just runs the draw code (45 ms). GPUI behaves similarly: its cost depends on the tree after the change (8 ms to hide), whereas a retained framework pays for the difference between before and after—usually tiny, except when the difference is the whole screen.

That said, this is a very different kind of cost from the linear per-update slope above. Nothing in a signal framework’s API contract forces mounting and tearing down nodes to stay this expensive. It is an implementation and optimization problem, not a semantic ceiling. zgui is nowhere near the best possible implementation here (a single pass of mount optimizations already cut its page-switch and restore times by roughly a third, with plenty left on the table). Freya’s creation cost is currently much steeper (2.7 seconds to restore 3,000 rows, where the runner cut it off), and Floem’s memory overhead hits 376 KB per row—1.3 GB for a 3,000-row dashboard. The numbers get blown up further since the tested retained framework also tend to offer more complex styling and layout semantics (which is inherently more expensive).

When every row moves instead of being recreated (sorting the table or resizing the window), the state model mostly drops out and you’re just comparing layout and paint engines: at 33k elements, sorting takes 16 ms in zgui, 26 ms in egui, 32 ms in Freya, 40 ms in Dioxus (37 ms with Skia), 43 ms in Iced, 122 ms in GPUI, and 186 ms in Tauri (as WebKit lays out a table over 100,000 pixels tall).

5. Iced is quite fast, and signals don’t imply a fast renderer

Iced held up much better than I expected. It’s near the top for hover, hits 0% missed refreshes on both glides and flings at every size, uses almost the least memory (~22 KB/row), resizes fastest at 3,000 rows (17 ms, or 14 ms with lazy, vs. 38 ms for egui, 43 ms for zgui, and 206 ms for GPUI), and restores 3,000 rows faster than everything else.

In my last post, I wrote that Elm’s linear cost is “in the contract” because every message rebuilds view. That still turns out to be true, when a message is actually sent. Typing a character in Iced scales linearly (+0.33 ms per 1k elements, reaching 12.0 ms at 33k, or 7.4 ms with lazy), and a spinner firing a message every frame drops 20% of refreshes at 3,000 rows (0% with lazy). What I missed is that Iced’s built-in widgets handle hover and scrolling internally without emitting a message, skipping view altogether. So Iced is plenty fast for standard desktop apps, just know that custom per-frame interactions routed through update/view (like dragging a node in a graph) will hit the linear curve instead of the widget fast path.

Floem and Vizia confirm the flip side: signals alone don’t make a framework fast. Both track state dependencies precisely, and both then run engine passes expensive enough to lose to egui re-running everything from scratch.

Independent results

While working on this, I had very constructive discussions with Marc, the author of Freya, who maintains his own GUI benchmark at areweactuallyguiyet.mespin.me.6 His setup is simpler and uses MangoHud for external frame timing rather than a custom compositor. Even with a different app and a completely different measurement setup, both benchmarks land on broadly the same conclusions, which is reassuring, since any single benchmark harness is easy to accidentally bias.

How the benchmark works

Timing a GUI is messy because a frame passes through the event loop, update logic, layout, paint, GPU execution, compositor, and display. Internal timers miss everything downstream. Zed’s team once wrote about seeing stutter “with our eyes, even though we were consistently measuring frame times under 4ms,” while the system HUD showed 8–16 ms.7 High-speed cameras measure real photons, but at 60 Hz a single frame is coarser than most of the differences we care about.

Web benchmarks (js-framework-benchmark, Speedometer, Chrome’s EventLatency) all share one engine, so the browser trace gives every framework the same clock. Native Rust toolkits don’t share an engine, the first thing they all have in common is the window system. So I used the window system to measure.8

fakeland is a real Wayland compositor built on Smithay,9 minus the physical monitor. An app connects to it like any desktop, renders on the real GPU, and receives normal wl_pointer and wl_keyboard events. The compositor logs when it flushed an input, when the app committed a buffer, and when the buffer’s GPU fence signaled, then reads back the pixels around the target widget to find the first buffer that actually changed.

Here is the basic tradeoff of this approach:

ProsCons
Same clock for every frameworkLinux and Wayland only
Real input path and real GPU workDisplay Scanout is modeled
Unmodified apps, no instrumentationNo real panel or desktop compositor in the path
Thousands of unattended samplesShares the GPU with my desktop session
Every frame is recordedYou have to write a compositor

Keeping the comparison fair

All nine apps are built from one shared spec (coordinates, colors, strings, rows). Before measuring anything, the runner takes a screenshot and checks fixed pixels against the spec so a broken layout fails immediately instead of silently probing the wrong pixels.

To avoid unconsciously favoring one framework, I stuck to five rules (every exception is documented in the repo):3

  1. Use the framework’s own widgets (scroll view, text input, switch, menu, virtual list, animation).
  2. Structure state the way the framework’s documentation recommends.
  3. Leave defaults alone (renderer, present mode, scroll speed, smoothing).
  4. No app-level optimizations in the base build; opt-in caches (GPUI cached, Iced lazy) go in separate tuned builds.
  5. If a widget doesn’t exist, build the smallest reasonable one and flag it (hollow markers in the explorer).

Rule 5 turned up some fun quirks: egui has no switch widget (borrowed from egui’s own demo instead), Iced has no menu or virtual list, GPUI can only rotate SVGs (so its spinner is an SVG), Vizia’s animations couldn’t loop at the pinned version (so a 16 ms timer drives it at 62 Hz) and it presents an empty window before its first real frame, the two OpenGL apps (Vizia and Dioxus with Skia) occasionally panic with an EGL out-of-memory error during window resizes, and WebKit caps element height at 33,554,432 pixels (so Tauri’s million-row virtual list quietly stops at row 645,000). zgui is the only app with no flagged entries, which isn’t surprising since I wrote it, but worth keeping in mind.

Under the hood: timing stages, fake vsync, scroll detection, and one known flaw

Stage breakdown. For zgui at 3,000 rows, a single hover sample breaks down like this:

StageMedian
input sent → buffer committed1.2 ms
committed → GPU fence signaled0.5 ms
GPU finished → compositor latch2.7 ms
latch → simulated refresh1.0 ms
total5.8 ms

The response times in this post are the first two stages combined (cross-checked earlier against zgui’s own internal protocol timestamps within ~0.1 ms). The last two stages are just waiting for the next display refresh; inputs are scheduled up front with random sub-frame offsets to avoid phase-locking and coordinated omission.

Fake display & explicit sync. The fake monitor is a CLOCK_MONOTONIC schedule. One millisecond before each refresh, the compositor latches the newest buffer whose GPU fence (linux-drm-syncobj-v1) has signaled, then sends presentation feedback and frame callbacks. Every native framework attaches an explicit sync fence; Tauri (under its NVIDIA/Wayland workaround) arrives via shared memory without one, so its GPU work is folded into commit time. Any sample where the compositor itself woke up more than 2 ms late is flagged invalid.

Scroll detection. The compositor captures every presented frame and correlates pixel rows between consecutive frames against injected scroll events, calibrating each framework’s scroll gain first. Because identical table rows look the same when shifted by one row height, the final check shifts the entire previous frame by the candidate offset and verifies that every pixel (text included) lines up. For fling scrolls, missed refreshes are only counted while input events are actually arriving, not during each framework’s own momentum tail.

One known flaw in the explorer: Toggle probes alternate directions (sort asc/desc, open/close menu, type z / backspace) and pool both directions into one median. That works for symmetric actions like sorting, but breaks on asymmetric ones: GPUI’s search alternates between 7.7 ms and 143 ms, giving a misleading pooled median of 8.4 ms. I split those directions by hand in this post; in the explorer, read the median as the cheap direction and p95 as the expensive one until I fix it.

When the GPU profiler stalls the GPU

The first full run of the suite took seven hours. When it finished, 624 of 1,199 reports (52%) were flagged invalid, all for the same reason: late compositor wakeups. On a 32-thread machine doing nothing else, the compositor was routinely waking up 8 ms late.

My first suspect was pixel readback, since it runs on the compositor thread and touches the GPU—but readbacks were already tucked between deadlines and only took ~1 ms.

The actual culprit was the resource sampler. Every 50 ms it asked NVIDIA’s NVML library for per-process GPU usage and total card energy draw. On this NVIDIA driver, those two queries block other GPU work: whenever the compositor (or the app under test) allocated or freed a buffer while a query was in flight, it stalled for up to 16 ms. (This seems to be a known driver issue; people hit the exact same desktop stutter running nvidia-smi or nvtop.10)

In other words, the single biggest source of GPU delay in my GPU benchmark was the code measuring GPU usage.

Switching those two cumulative-counter queries from 50 ms to once per second and gating readbacks so they never overlap a query dropped invalid reports from 52% down to 7.7% in the current run (84 of 1,089 reports—almost all page switches, sorts, and resizes, where buffer reallocations can still collide with the 1 Hz poll; the real fix is pausing NVML completely during probes). Even worse, most medians barely moved between the broken run and the fixed one, a good reminder of how easily a benchmark can be half-broken without the headline numbers giving it away. I only caught it because fakeland checks its own wakeup jitter.

A few other bugs I dealt with (to give an impression of how easy it is to measure the wrong thing):

  • The click probe held the mouse button down for 40 ms, making frameworks that act on release look 40 ms slower than ones that act on press.
  • “Wait until the window settles” returned immediately if the window was quiet before the input, occasionally screenshotting the pre-input frame.
  • The scroll analyzer treated any frame that moved less than the raw input delta as a stall, unfairly penalizing frameworks with smooth scrolling. Now only a repeated frame counts as a stall.

Limitations

Every benchmark has blind spots; here are the big ones:

  • One Linux machine, one GPU vendor. Intel i9-13900K, RTX 3080 Ti, proprietary NVIDIA driver, Linux 7.1, 1280×800 at 1× scale, sharing the GPU with my desktop session. MacOS, Windows, integrated GPUs, HiDPI, or laptops on battery are not covered.
  • One app only. Lots of small styled boxes with short text. A toolkit that shines on rich documents or huge vector canvases (e.g.) doesn’t get credit for it here.
  • No accessibility bus. Some toolkits do significantly more work with accessibility active; this run didn’t enable it.
  • Don’t over-read tiny gaps. Run-to-run noise can easily shift a cell by 0.5–1 ms, and a couple of individual cells are just weird (like egui taking 8.6 ms on forward typing vs. 1.6 ms on backspace at 30 rows). Pay attention to trends across all four sizes, not 0.3 ms differences.
  • Author bias. I wrote all nine apps and only really know two of the frameworks. Maintainers could almost certainly speed up their apps in an afternoon (although that is not necessarily the point of this).
Exact host configuration and tested framework versions
  • Host: Intel Core i9-13900K, NVIDIA RTX 3080 Ti (nvidia-drm 610.43.03), Linux 7.1.5, performance CPU governor, 1280×800 @ 1× scale.
  • Sampling: 30–50 runs per input probe, 5 runs per startup/pacing test; 7.7% of reports (84 of 1,089) still carry a wakeup-jitter flag (shown with a ring in the explorer). CPU/RAM sampled via /proc every 50 ms.
  • Versions: zgui 4903c1ad, gpui-kit 0.11.0, gpui-fast 0.1.19, Freya 0.6.0-alpha.2, Vizia 0.4.0, Floem 1351ffb, Iced 0.14.0, eframe 0.37.0, dioxus-native 0.8.0-alpha.4, Tauri 2.13.0 + SolidJS 1.9.20 on WebKitGTK 2.52.

Conclusion

The new harness backs up the core performance argument from my GPUI post better than the old charts did: when a framework re-runs the UI, cost follows tree size in every column, and GPUI’s opt-in caching helps only ever along view boundaries. At the same time, the data suggests two real takeaways: Iced is faster in practice than I gave it credit for thanks to low constants and widget fast paths, and zgui’s creation cost (24–26 ms for a small page switch) is still worth optimizing further, even though—unlike a per-frame linear scan—it is an implementation detail and not a ceiling baked into the API contract.

More broadly, I’d love for gui-bench to stop being a one-person project:

  • Contribute your framework (or fix my apps). If you maintain or use one of the frameworks here and spot my implementation doing something silly, or if you want to add another framework that isn’t covered yet (Slint, Xilem, Makepad, Qt, Flutter, whatever you care about), PRs to gui-bench are very welcome. I’ll re-run and update the results.
  • GPU CI runner sponsorship. Right now a full sweep takes hours on my personal desktop with one NVIDIA card. If anyone would like to sponsor a dedicated Linux GPU CI runner (especially AMD or Intel hardware, so we aren’t stuck with one NVIDIA box) to keep the suite running automatically as frameworks evolve, please reach out.
  • Next on my list: splitting toggle directions in the explorer and silencing the NVML sampler during active probes.

Every number, distribution, screenshot, and validity check is up at gui-bench.zortax.de. If something looks off, or if you want to beat my naive implementation of your favorite toolkit, go poke at it and let me know.

References