A Critique of GPUI: Why Its State Model May Not Scale
The post "A Critique of GPUI" argues that the state models of GPUI and egui, two native Rust GUI frameworks, are dead ends for complex desktop applications. The author holds that every UI framework must decide what runs when one value changes, and that performance cannot scale unless the framework knows what changed and who depends on it.
GPUI calls itself a hybrid immediate and retained mode[1] framework and keeps state in entities. Because Rust has no write barrier, a state change needs an explicit cx.notify call, and GPUI cannot see which field changed, so it re-renders every view outside a valid .cached() boundary. The author says .cached() is rarely used by application authors.
In the author's benchmarks, changing one label among 3,000 live rows took 8.4 ms with a cached view per row, and 92 ms when the rows were plain elements. The gpui-fast fork, which keeps each view's subtree between frames, reduced the 8.4 ms case to 3.4 ms. The author proposes signals[2] as the alternative, as in his zgui framework, and says the Elm architecture[3] is simple at small scales but that signals and stores are easier to reason about in complex applications.
Read the original blog.zortax.deDiscussion
Discussion
Commenters mostly agree the reasoning is sound, but several doubt that the 3,000-row case matters for most real-world software. Others argue that Rust UI frameworks should move from React-style models toward signals, while one commenter notes that the update function in Elm-style designs is meant to stay pure.
Sources
-
blog.zortax.de
A Critique of GPUI
-
KRGeekNews KO
GPUI 비판



