Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Am I able to cache egui? #125

Open
Raj2032 opened this issue Jan 16, 2022 · 1 comment
Open

Am I able to cache egui? #125

Raj2032 opened this issue Jan 16, 2022 · 1 comment

Comments

@Raj2032
Copy link

Raj2032 commented Jan 16, 2022

Hey guys, I am thinking of forking egui (a pure reactive immediate gui library) to implement some caching capabilities.

image

See if I move the slider, everything has to update, even the Click each year button (where the red arrow is pointing to) which is a waste of CPU usage. What I wanted to do instead is if I move the slider, the slider only gets updated/redrawn, all the other elements don't redraw and remain static/cached.

I was wondering if I forked egui, would lru-rs crate would be appropriate for such use?

@FlysoftBeta
Copy link

Interesting, but "updating everything" is what "immediate" means. See https://en.wikipedia.org/wiki/Immediate_mode_GUI. You would probably need something like Retained mode GUI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants