Fix #5368 - Improve test efficiancy
There were a number of tests where lots of models where being iterated through and then at the end committing them. The problem is all the changes had to be kept in memory or on disk somewhere before they were commit to the database. This fix commits each change as it's being made, allowing resources to be freed and fixing some of the inefficiencies
This commit is contained in:
parent
63053f8c66
commit
ccd9dabe75
@ -1371,7 +1371,8 @@ def migrate_data_foreign_keys(db):
|
||||
temp_object=target_gmr.inserted_primary_key[0]
|
||||
))
|
||||
|
||||
# Commit to the database.
|
||||
# Commit to the database. We're doing it here rather than outside the
|
||||
# loop because if the server has a lot of data this can cause problems.
|
||||
db.commit()
|
||||
|
||||
@RegisterMigration(30, MIGRATIONS)
|
||||
|
Loading…
x
Reference in New Issue
Block a user