-
-
Notifications
You must be signed in to change notification settings - Fork 357
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
[FEATURE] Re-render Only When Variable Changes #1078
Labels
enhancement
New feature or request
Comments
I want to work on this issue. Is it as simple as adding an if condition on this line or something deeper needs to be taken care of or is there a better way to implement this? @elkowar My proposed solution: if let Some(entry) = self.graph.scope_at_mut(scope_index).and_then(|scope| scope.data.get_mut(updated_var)) {
if *entry != new_value {
*entry = new_value;
self.notify_value_changed(scope_index, updated_var)?;
}
} I tested this on my system (although with only a few widgets, not extensively), and it seemed to work. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of the requested feature
Using Hyprland's damage blink debug option, it can be seen that widgets re-render even if the variables used in them do not change. The re-render is triggered whenever a poll variable polls, even if its value remains the same as the previous.
It would be good to re-render widgets only if the new value of a variable is different from the previous to save resources.
Proposed configuration syntax
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: