Opened 2 years ago
Last modified 2 years ago
#33848 closed Cleanup/optimization
Migration StateApps.clone deepcopy too many objects — at Version 1
Reported by: | Iuri de Silvio | Owned by: | nobody |
---|---|---|---|
Component: | Migrations | Version: | 4.0 |
Severity: | Normal | Keywords: | |
Cc: | Simon Charette | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
StateApps.clone
execute two slow deep copies. The first one copy all models. The second one copy app configs, that include all apps and the specific app models.
In my application, with ~250 models, this deepcopy is around 5% of migration time. I was able to cleanup StateApps
before copy, to not copy all models and apps every operation again. After the optimization, it takes less than 1% of migration time.
Note:
See TracTickets
for help on using tickets.