-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Improve performance of updating with using update_field #71
Comments
Hello @MAM-SYS There is little point here Line 47 in 5ef2dca
Although this issue is not a bug but we could have an improvement on our saving methods. Try to add update_fields. Also I'm not sure how it's work when you use it with signals. I change the issue title. Notice me if you can work on this performance issue. |
@sbabashahi |
@MAM-SYS your suggestion has an impact on all of our saves, we need to add profile.save every where we had user.save, I wsa thinking about a cheat :)), imagine you add update_fields of user in user.save(....) but before that you set an atribute on user lest call it _profile_update_fields then in save_user_profile we can extract this field and use it in instance.profile.save(....) long story short for example:
then in save_user_profile
what do you think? |
@sbabashahi |
I think we can continue with your idea, just test it for any side effect. |
…...]) for Profile and User models jobguywork#71
Hello Friends
i was reviewing codes that i faced something
backend/authnz/transactions.py
Line 9 in 5ef2dca
backend/authnz/transactions.py
Line 19 in 5ef2dca
backend/authnz/transactions.py
Line 26 in 5ef2dca
in these methods we are changing profile data but we don't apply these changes to the database with user.profile.save() (we are just saving user changes)
is there any reason for this ?
The text was updated successfully, but these errors were encountered: