#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          |   Keywords:
 Triage Stage:  Unreviewed      |  Has patch:  0
Easy pickings:  0               |      UI/UX:  0
--------------------------------+--------------------
 Not 100% sure I have complete understanding of what happens, or why, but
 it seems a `RenameModel` migration leads to an evaluation of `state.apps`,
 which affects the time it takes for it and all following migration states
 to be calculated.

 This is for a pretty big app, with lots of migrations. The time to run
 `makemigrations` for all apps goes from 1 seconds to 77 seconds with one
 `RenameModel` migration.

 A test where `apps.state` was replaced by `temp_state = state.close();
 apps = temp_state.apps` resolved the issue, but I'm not completely sure of
 the side effects of doing that.

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

Reply via email to