Improve performance of updating with using model.save(update_fields=[...]) for Profile and User models #77
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello Friends
First of all, apologize me if it takes too long to send changes for this issue
Here is summary of what i did:
1 - I removed the signal receiver for saving profile automatically
2 - I find all the lines that we are updating profile instance (by user.save()), and change them.so now, we are updating profile instances manually with their update_fields
3 - I also pass the update_fields for User instances in some lines
I checked the code so many times not to miss anything. So if i miss anything, apologize me again
I had to change so many lines for this issue so i understand if you think it's too risky to add these changes without completely testing
So if you think they are useless we can throw them away. I just wanted to take this opportunity to help for this issue
It's All Your Decision..
Thanks