Discord rewrites app in GPUI amid performance critique
Discord is rewriting its application using the GPUI framework, while a technical critique argues the framework's state model is a dead end for complex desktop apps.
Discord announced that its app is being rewritten using the GPUI framework. GPUI describes itself as a hybrid immediate and retained mode framework. In this system, state changes require an explicit notification using the notify method. The framework cannot see which field changed because Rust does not have a write barrier on &mut.
An author argues that both GPUI and egui state models are dead ends for complex desktop applications. The author ported GPUI's current Linux renderer to wgpu and built the benchmark harness used in the critique. Changing one label in a GPUI app with 3,000 live rows takes 8.4 ms. Writing a label as plain elements in GPUI takes 92 ms compared to 8.4 ms with cached views. A hand-written equality guard reduces the cost of writing an equal value from 7.9 ms to 0.9 µs.
The Zed text editor bypasses GPUI's layout and view semantics by implementing itself as a custom element. The gpui-fast fork of GPUI takes a 3,000-row label benchmark from 8.4 ms to 3.4 ms. On a virtualized list, Iced is measured at 0.19 ms performance. Vizia added signals to its architecture because it got per-field writes. The Angular team stated in 2023 that the zone.js approach has not scaled well.
Sources
Every sentence of this story was checked against facts quoted from these articles. How we make the news
Spotted an error? Tell us
