Modifying a single label in a 3,000-row list costs GPUI 8.4 milliseconds of native rendering time. On a 120Hz display, the entire frame budget is just 8.3 milliseconds. A trivial text update consumes the whole frame. Without view caching on bare elements, that figure skyrockets to 92 milliseconds.
Modern UI frameworks model views as pure functions of state, exchanging manual node synchronization for declarative ergonomics. Yet this abstraction severs the link needed to deduce fine-grained dependencies. The battleground for desktop frameworks is shifting toward whether their state models can express a reactive dependency graph. Without read-dependency tracking, even the smallest perturbation degenerates into an exhaustive component-tree traversal.
An 8.4ms Label Change: Pure Functions Walk the Entire Component Tree
Zed built its reputation on blistering native performance. However, stress testing long lists reveals architectural limits. A benchmark created by zortax simulates a 3,000-row list with per-row view caching enabled. Toggling a single label takes GPUI 8.4 milliseconds to reconcile, scaling linearly with the number of rows.
Figure: GPUI frame time scales linearly with active rows. Note that even with per-row view caching, update cost climbs linearly with tree size. Source: blog.zortax.de
If developers manually implement equality guards on every cell, the frame time drops dramatically from 7.9 milliseconds to 0.9 microseconds. This immense performance gap exposes an intrinsic flaw in pure-functional views. Expecting application developers to write manual equality checks for every UI node defeats the purpose of a declarative framework. Lacking fine-grained tracking, the framework has no choice but to reconcile the entire tree top-down from the root whenever state changes.
The fundamental disconnect lies between the granularity of data updates and the granularity of view repainting. Under the render(state) paradigm, the framework knows that state has changed, but cannot know who is reading that state. To guarantee eventual consistency, the rendering pipeline must inspect every node. What developers save in dependency declarations during authoring is paid back every frame in CPU traversal cycles.
Retention Caching Cannot Eliminate Exhaustive Traversal
To mitigate full-tree inspection overhead, the Zed team introduced a retention caching mechanism in their experimental gpui-fast branch. In the same 3,000-row list benchmark, updating a single label dropped from 8.4 milliseconds down to 3.4 milliseconds. While this represents a 60% reduction, the frame ultimately repaints only 3 views and lays out a single element. Spending 3.4 milliseconds to lay out one element illustrates that most compute cycles are still squandered walking the component tree.
Figure: Frame times under different state ownership and retention strategies. Notice the performance penalty of retention under a shared state model. Source: blog.zortax.de
When scaling to a multi-pane layout with 60 panels, the caching strategy encounters new friction. When state is isolated and owned locally by each panel, caching cuts single-update latency by 83%. However, once state is consolidated into a global shared model, retention caching actually makes the frame 11% slower. When multiple panels concurrently read shared state, cache-invalidation checks and hash comparisons devour the performance gains of view reuse.
Zed’s own measurements show that retention introduces a 1% to 3% performance regression under routine workloads. Official developers acknowledge that real-world performance gains come primarily from other pipeline optimizations. Microbenchmark wins rarely translate cleanly to production applications. Coarse-grained view caching is no substitute for an exact dependency graph—cache verification itself burns valuable CPU cycles.
Sibling Frameworks Face Identical Rebuild Dilemmas
Exhaustive tree walking is not unique to GPUI. Iced, built on the Elm Architecture, runs into the same barrier. In an identical 3,000-row benchmark, changing a single label causes Iced to reallocate 39,023 components in a single frame, taking 7.3 milliseconds. Wrapping each row in a lazy container only reduces the time to 5.7 milliseconds, as computing key hashes across the entire tree remains mandatory.
Official Iced examples recommend incrementing a version: u8 counter to mark dirty data. In practice, this is little more than manual dirty flagging under another name—a retreat to manual state synchronization. The full-rebuild model also inflates message architectures in complex applications. For example, cosmic-files defines 136 top-level message variants and 73 tab variants, scattering state synchronization logic across sprawling pattern-matching branches.
Compilers guarantee pattern-matching exhaustiveness, but cannot verify the operational correctness of cross-branch data synchronization. With viewport virtualization, however, Iced compresses frame time down to 0.19 milliseconds, placing it among the fastest implementations. When active screen elements are physically bounded, the cost of full reconstruction can be absorbed by modern hardware. The architectural tension of pure-functional models erupts primarily under non-virtualized, high-volume data streams.
The Web’s Unified Shift to Signal-Based Fine-Grained Dependencies
Faced with the cost of full-tree traversals, the web frontend ecosystem has largely converged on signals over recent years. From Angular and Vue to Solid, modern frameworks have embraced reactive dependency graphs. Svelte adopted signals in its latest major revision, candidly observing that “Knockout was right all along.”
Figure: Comparison of five mainstream desktop and frontend state models. Note how run-once signal models on the right update local closures directly. Source: blog.zortax.de
Early Redux architectures followed a similar trajectory. When state is treated as a global database, every action triggers a recalculation of all selectors. This bottleneck catalyzed the ecosystem’s migration toward fine-grained primitives. React, which clings to full component-tree re-renders, has become an exception in preserving pure functions.
The Rust desktop ecosystem is exploring analogous paths. GUI framework Vizia migrated from lens-based state to a signals model in March 2026, preserving centralized organization while unlocking localized reactivity. Frameworks like Floem and zgui reduce the render function to a one-time topology builder. Leaf nodes capture signals via closures, mutating local nodes in place whenever state shifts and bypassing hierarchical tree scheduling entirely.
Architectural Trade-Offs Over Absolute Dogma
Benchmark data must be interpreted within its engineering context. The author of the benchmark, zortax, is developing the signal-driven framework zgui and authored the wgpu port of GPUI. The benchmark evaluates a non-virtualized long list—the most punishing edge case for pure-functional rendering.
Community discussions surrounding the findings highlight nuanced trade-offs. Engineers point out that CAD tools, vector rendering suites, and audio software have run reliably on immediate-mode architectures for decades. Immediate mode and pure-functional views dramatically simplify lifecycle management, avoiding the closure and memory overhead inherent to reactive dependency graphs.
Scrutiny of GPUI also extends to hardware efficiency. Developers report elevated idle energy consumption in GPUI, driving exploration of alternatives like sidestep. Meanwhile, egui leverages minimal abstraction and WebAssembly support to deliver lightweight desktop tooling directly inside browsers. Every architecture strikes its own balance between peak throughput and developer mental overhead.
UI frameworks offer no free abstractions. The expressive power of a state model sets the ceiling for runtime performance. Defining views as pure functions without a dependency graph makes full-tree traversal an inescapable physical reality. The dependency declarations saved while writing code must ultimately be paid back against the frame budget.
Reference Links:
- A Critique of GPUI
- Hacker News Discussion