Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That's because egui uses an "immediate mode" approach: it's rendering everything from scratch every time something _might_ have changed (e.g. a mouse move could've trigged a hover effect).

Whereas the DOM uses "retained mode": it continually modifies a representation of the layout (DOM elements) and re-renders when something _actually_ changes.

You can click on the "Backend" button at the top, and "Mean CPU usage" will tell you how long it takes for each frame to be produced. It'll vary depending on how complex the layout is: e.g. how many windows are open. But, contrary to retained mode, it doesn't matter at all if everything is animating simultaneously.

More about immediate vs. retained: https://github.com/emilk/egui#why-immediate-mode



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: