-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Do not mark unchanged computed var deps as dirty #4488
base: main
Are you sure you want to change the base?
Do not mark unchanged computed var deps as dirty #4488
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one potentially issue i see with this approach is it makes it harder to manually mark a var as dirty, for example if internal change tracking is not working for a certain kind of object, a hackaround was always to assign it to itself to signal to the framework that it should be included in the delta. i know @adhami3310 uses this trick quite a bit.
@masenf I knew this comment was coming 😆 However, I have 2 arguments against it:
|
I just refactored one small repo to always check if the var has changed before assignment. Now I have a diff of 85 lines with repetitive if self.var != new_var:
self.var = new_var |
haven't looked into this too deeply but |
current implementation is not optimal, i have a better one coming |
need to recheck order of computed var computation |
part of #4487