#33848: Migration StateApps.clone deepcopy too many objects
------------------------------------------------+------------------------
Reporter: Iuri de Silvio | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Migrations | Version: 4.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
`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.
https://github.com/django/django/blob/d4c5d2b52c897ccc07f04482d3f42f976a79223c/django/db/migrations/state.py#L683
--
Ticket URL: <https://code.djangoproject.com/ticket/33848>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018204086185-3372099e-b6e0-4476-9680-75fdae937b21-000000%40eu-central-1.amazonses.com.