
ハセン حسن
@hasen_95dx • 5,470 subscribers
Shorts
Videos

I am doing an experiment to compare various UI framework in terms of how long it takes to *layout* the UI for one frame (average). I have basically the same UI implemented in all the frameworks, and they each have a mode where they are operated automatically in a way that stresses the layout code, and print out how long it took on average to layout frames. So far, Rust's egui seems to have shortest layout time among the immediate mode libraries. Rust's Iced has a lower average number, but I think it's more of a retained mode library. GPUI is relatively slow Flutter is on par with GPUI SwiftUI is the slowest of them all.
ハセン حسن86,113 görüntüleme • 18 gün önce

Immediate Mode GUI works just fine with full CPU rendering - no GPU needed. Not even any clever region invalidation. Just caching for glyphs and such. CPU usage *looks* high, but the interaction is as smooth as it can be, and the computer does not feel heavy at all. I can have many such apps open and they all work just as smoothly as if there was only one open. Here in this demo you see several programs: A process monitor that reports CPU usage of running programs A "find in files" GUI that can find find text (and regex) in a project directory very quickly A font viewer that shows a sample string in all system fonts so you can find a suitable font A profile data visualizer that can read .pprof files generated by the Go runtime A disk usage analyzer that recursively calculates directory sizes to help you find out where your disk space has gone All of them are immediate mode GUI programs rendered on the CPU. All of them running at the same time. All of them run very smoothly. All their binary sizes are around 10MB. The GUI framework itself ends up being about 1MB. Proofs in the reply
ハセン حسن10,063 görüntüleme • 2 ay önce
Daha fazla içerik yok.