#22608: Migrations optimizer slow (due to double working?)
--------------------------------------+------------------------------------
     Reporter:  David S               |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Migrations            |                  Version:  master
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by Simon Charette):

 Things have improved significantly since this ticket was opened 4 years
 ago.

 `makemigrations` past improvements include

 1. Multiple tickets to avoid or delay model rendering during operation's
 `state_forwards`.
 2. #24554: Sped up migrations by rendering initial apps when they are
 first needed
 3. #29243: Improve efficiency of migration graph algorithm

 the last remaining path that causes slowdown during the `makemigrations`
 phase is the model rendering caused by the auto-detector. I just filed a
 ticket to cover that in #29899.

 The main slowdown during the `migrate` phase is the heavy model rendering
 required to pass ''fake'' models to the schema editor. Markus Holtermann
 have a long standing
 [https://github.com/django/django/compare/master...MarkusH:schemaeditor-
 modelstate branch to completely stop rendering models to during the
 migration phase]. That includes significant changes to the schema editor
 to be able to operate on model states instead of rendered model classes
 but it's a good step forward IMO. I just filed a ticket to track this
 optimization in #29898.

 Not sure if there is anything actionable in this ticket at this point. I'd
 suggest we close it and open more focused ones instead.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/22608#comment:25>
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/064.3a3afcb165dfd73350d1a296e5d32afc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to