from Hacker News

Proving Immediate Mode GUIs Are Performant

by emilk on 5/1/24, 7:15 PM with 8 comments

  • by ditmarw on 5/2/24, 6:48 AM

    it's truly absurd that a senior Facebook engineer as bragged about on the page was not able to choose a single QT or platform-native GUI to compare imgui to.

    yes, imgui is just as good as these other applications that are literally embedding chromium. now that's science! I guess there's no extraneous resource usage here.

  • by lozank on 5/2/24, 7:55 AM

    I agree with the final verdict, mostly because today's systems are really good at optimizing those things. Unfortunately, testing power consumption on a laptop is inherently prone to errors. You have no way to detect if a laptop uses additional power from the battery to smoothen sudden power spikes etc. And even if those tests were done on a desktop (or a laptop without a battery), you can't protect against MacOS/Windows doing stuff in the background (for example system updates, windows defender stuff etc etc)

    This is definitely a super interesting experiment, just take the one-time measurements without any kind of repetition with a grain of salt..

  • by eviks on 5/2/24, 4:45 AM

    > These tests are fundamentally an apples to oranges test. That's ok!

    But it unfortunately isn't, you need proper tests to answer such a broad question

  • by sneusse on 5/3/24, 7:33 AM

    Battery life is a weird way to compare these technologies. It does not matter if you dispatch your draw calls or the retained mode framework does it for you - if you have new data to draw every frame then _somebody_ has to do it.

    I do ship an IM GUI application to a small group of users and they will not know or care, as long as it does the job it needs to do. What made me choose this approach: I do not need another language/technology for my UI. Composition of the UI is done like I compose code: using functions/objects. I could see this approach failing on bigger projects or when you would have a dedicated designer doing the UI/UX stuff. As long as only programmers are working on the project I think it's fine and quite easy to understand for others what's going on in the 'UI code'.

  • by masfoobar on 5/2/24, 9:45 AM

    I find this topic interesting. I have toyed with immediate mode like microui, nuklear, etc. In many ways, even with low-level programming languages, the readability can be much easier compared to traditional UI that have their own approach to breaking the views, models, events, etc.

    For me, it is really about considering IMGUI over the likes of "typical" GUI apps like WPF.

    Seriously, if I could find an IMGUI that allowed a free editor-like text entry with coloured fonts and styles... and a Map section (ie OpenStreetMap) -- I would be trying it out and comparing the performance (and memory) over WPF or web version.

    Just trying to imagine the advantages of easy building to an exe.. even a WASM build as well.

  • by 000ooo000 on 5/2/24, 8:27 AM

    Am I reading this right? They compare a variety of IMGUI apps with.. basically 3 electron apps?
  • by IshKebab on 5/2/24, 1:13 PM

    Next week on Proving Nothing we show that cars are faster than planes using the Wright Flyer.