backend icon indicating copy to clipboard operation
backend copied to clipboard

Improve performance of updating with using model.save(update_fields=[...]) for Profile and User models

Open MAM-SYS opened this issue 3 years ago • 0 comments

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

MAM-SYS avatar Jul 14 '21 19:07 MAM-SYS