obj.refresh_from_db() is called for every item in a form. In my case that lead to the same query for fetching an object being executed 8 times, even though once would have been enough.
I haven't added an issue for that, as I had the impression adding an issue and adding steps to reproduce were more complicated than just directly fixing the issue.
Tested via:
No tests added, as functionality facing the end user did not change and this is purely a performance related improvement. I could add a unit test checking the amount of queries executed if needed.
Please tell me if more information on this issue is needed or whether this description is sufficient.
Fixes
obj.refresh_from_db()
is called for every item in a form. In my case that lead to the same query for fetching an object being executed 8 times, even though once would have been enough.I haven't added an issue for that, as I had the impression adding an issue and adding steps to reproduce were more complicated than just directly fixing the issue.
Tested via:
No tests added, as functionality facing the end user did not change and this is purely a performance related improvement. I could add a unit test checking the amount of queries executed if needed.
Please tell me if more information on this issue is needed or whether this description is sufficient.