A Critique of GPUI blog.zortax.de · 48 points · 19 comments · HN thread TL;DR Th...

@best

A Critique of GPUI blog.zortax.de · 48 points · 19 comments · HN thread

TL;DR The author, who ported GPUI's Linux renderer to wgpu and builds the signal-based zgui framework, argues that GPUI's and egui's state models (and Elm-style architectures) cannot express what changed or who depends on it, so they scale poorly for complex desktop apps. Backed by a custom benchmark harness, they conclude that signal-based frameworks with components that run once are the better foundation.

  • GPUI's notify call names an entity but gives no field-level information, so GPUI re-renders every view not behind a valid .cached() boundary; a 3,000-row label update takes 8.4 ms with caching and 92 ms without.
  • Retaining more in GPUI (gpui-fast, Zed experiments) helps only where state lines up with views; with a shared model, retention made one benchmark frame 11% slower.
  • Elm-style architectures and immediate mode (egui) scale linearly with UI size: Iced rebuilds 39,023 widgets per label change at 3,000 rows, and an egui frame at 3,000 rows costs about 32 ms.
  • Signals alone do not guarantee speed: Floem spends about 14 ms in layout after a 0.01 ms reactive update, and Vizia walks 120,091 entities for a 46 ms update.
  • The author argues run-once components with signals and reactive holes are the simplest API once fine-grained precision is needed, while acknowledging React's re-running model may be simpler for applications that never need it.
  • Disclosure: the author ported GPUI's Linux renderer to wgpu, built the benchmark harness, and works on zgui, which appears in the charts with the best scaling results.

Discussion The thread is skeptical and fairly divided. Several commenters question whether the Elm unread-counter example is really specific to Elm and whether signals would fix it, and others argue that complex desktop apps such as Adobe clones already work fine, which they see as evidence against the 'dead end' claim. Some point to laggy issue reports in an egui-based app and then dispute whether those problems come from the GUI at all. A large part of the discussion is about the article's authorship and rigor, with one commenter calling it AI-generated and criticizing the egui benchmarks and the handling of quotes, and another mocking the premise of AI critiquing a favored AI framework. Overall the mood is dismissive of the conclusion but engaged with the technical questions.

  • Article's conclusion does not follow from the evidence presented (many): Commenters argue that GUI complexity differs from application complexity and that complex, successful software is built on these frameworks anyway. They say the post's claim that the state models are dead ends is unproven.
  • Elm example does not show a signals advantage (some): One commenter asks how the unread counter problem would be better handled with signals, since it is not especially unique to Elm. The question challenges whether the example supports the argument.
  • Article seems AI-generated and its benchmarks are flawed (some): A commenter says the article is AI-generated and criticizes the egui benchmarks, the comparison of DOM performance to native frameworks, and the context of quotes from egui's creator. They decline to elaborate but offer to answer specific questions.
  • Chunking entities or using dirty tracking solves scaling (a few): One commenter suggests grouping hundreds of items into chunked entities, and another adds that reactive dirty-state libraries already do this, which they say is why React exists. This pushes back on the claim that a new state model is needed.
  • Real-world apps show GUI performance problems (a few): One commenter cites open issues describing slow, laggy UI in egui-based apps, while others reply that those issues mostly come from image processing or background work rather than the GUI framework.

Links from the comments

#GPUI #reactiveUI #rustGUI #egui #benchmarks