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

Model.__setattr__ unconditionally marks Fields as dirty #26

natecode opened this Issue May 12, 2015 · 1 comment


None yet
2 participants

natecode commented May 12, 2015

The flywheel/ code for Model calls self.mark_dirty_() for every field that the user assigns to. However, it's possible the values before/after are identical, wasting a round trip to DynamoDB and write capacity.

Would you consider checking the value and if the assignment would have no effect, skipping it? I'm ok if the check is only shallow and doesn't cover nested structures (dict within dict etc.), although that might be nice too. Thanks!


This comment has been minimized.


stevearc commented May 13, 2015

I'm looking into it. Trying to decide what the best behavior is for mutable fields, but the behavior can definitely be made better.

@stevearc stevearc closed this in 4a89a4b May 16, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment