Which one has more overhead, retained or immediate continous?

I am deciding between the two Rust libraries, one is egui (uses immediate mode) and the other one is fltk-rs (which uses retained mode).

I wanted to know which one has more overhead, immediate continuous mode or retained mode?

More overhead of what?

Performance and RAM usage?

Not an expert, but intuitively - immediate mode should be more costly CPU-wise (since operations are redone even when nothing really changes), retained mode is more costly memory-wise (since it have to store the state persistently). Everything else you should measure yourself, since every application will have different tradeoffs.

YEs but with immediate continous mode, I heard that it only redraws when needed to update something. so what is the huge difference between retained and immedite continous then?

You have it backwards, intermediate continuous mode will continually draw frames and is not as optimal as intermediate reactive mode. There's quite a bit of material available through google on the differences between immediate and retained ui implementations. In the end, I would recommend taking the time to try multiple libraries and approaches, running benchmarks and weighing the overall ease of use. Don't just take someone's answer and run with it without checking your other options as well.

2 Likes

That doesn't answer my question. It's like you're asking "which athlete is best", and I say "at what?" and you answer "sports." Athletes differ in which sports they are best at. GUI frameworks differ in which resources they use efficiently. There are many different aspects of performance, and there's no point in trying to choose one as optimal if you don't even know what your bottlenecks are going to be. If you aren't measuring your performance, you aren't optimizing anything.

1 Like

I see thanks

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.