#27310: Refactor RenameModel.state_forwards to avoid relying on state.apps.
------------------------------------------------+------------------------
               Reporter:  Simon Charette        |          Owner:  nobody
                   Type:  Cleanup/optimization  |         Status:  new
              Component:  Migrations            |        Version:  master
               Severity:  Normal                |       Keywords:
           Triage Stage:  Accepted              |      Has patch:  0
    Needs documentation:  0                     |    Needs tests:  0
Patch needs improvement:  0                     |  Easy pickings:  0
                  UI/UX:  0                     |
------------------------------------------------+------------------------
 `RenameModel` is the only built-in operation to rely on `state.apps`
 during `state_forwards`. Accessing `state.apps` can trigger model class
 rendering which is the main cause of slowdown during migration execution.

 While I'm aware Markus has been working on making the migration framework
 completely `state.apps` agnostic (the only exception being `RunPython`
 operations) fixing `RenameModel.state_forwards` alone seems like a more
 attainable goal with direct benefits as `state_forwards()` is meant to be
 called way more often then `database_forwards()` in a project lifetime.

--
Ticket URL: <https://code.djangoproject.com/ticket/27310>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.d16d0a7236cfa1d0ee5980a1ae02b538%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to