#26693: RenameModel causes state.apps rendering leading to massive time 
increase in
makemigrations
--------------------------------+--------------------------------------
     Reporter:  simonpercivall  |                    Owner:  nobody
         Type:  Uncategorized   |                   Status:  new
    Component:  Migrations      |                  Version:  1.9
     Severity:  Normal          |               Resolution:
     Keywords:                  |             Triage Stage:  Unreviewed
    Has patch:  0               |      Needs documentation:  0
  Needs tests:  0               |  Patch needs improvement:  0
Easy pickings:  0               |                    UI/UX:  0
--------------------------------+--------------------------------------

Comment (by simonpercivall):

 Well, no, it's the first `RenameModel` in our project, so I haven't seen
 it before.

 What I do see, to be more specific, is that, timing each
 `self.nodes[node].mutate_state(...)` call in `MigrationGraph.make_state`,
 each iteration is ~0.01ms. If I add a `RenameModel`, it clocks in at ~1
 second, and ''every'' `mutate_state` after that is >0.5 seconds, because,
 like I said, `state.apps` has been evaluated and set.

 It looks to be the same in Django 1.8 (i.e. things don't get expensive
 until `state.apps` has been evaluated once, since most of the state
 operations are no-ops if not `'apps' in self.__dict__`).

--
Ticket URL: <https://code.djangoproject.com/ticket/26693#comment:4>
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/072.d1a35056893b54d388faf0b4553aa34b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to