ITADN

Switching from iced to egui

#246Openfriedow 创建于 2025-07-04
F
friedowcommented
Over the past months centerpiece startup time has gotten slower and slower. This is mostly due to iced receiving more features and not being optimized for fast startup performance. The most pressing issue which influences the startup time of centerpiece negatively is font loading. This is tracked over [here](https://github.com/friedow/centerpiece/issues/183), has been an issue for a long time and does not seem to be fixed anytime soon. Since centerpiece is using a very minimal feature set of iced, I've been thinking about switching to another, more lightweight, ui library for quite some time. In the past weeks I've tinkered with egui on the [feat/egui branch](https://github.com/friedow/centerpiece/tree/feat/egui) and found that it reduces startup time. My recent tests have shown the following startup times of centerpiece - with iced ca. ~550ms - with egui ca. ~190ms This biggest issue right now is that eui has no support for the wayland layer shell protocol. egui is waiting for layer shell support in winit ([issue](https://github.com/rust-windowing/winit/issues/2582), [implementation](https://github.com/rust-windowing/winit/pull/4044)). The implementation seems finished and is waiting for reviews. Thus, it is hopefully upstreamed and implemented in egui in the next weeks. Until then I'm going to prepare a full port of centerpiece to egui, to release that right away.
2 条评论