#23745: Migrations migrate is slow
------------------------------------------------+------------------------
               Reporter:  claudep               |          Owner:  nobody
                   Type:  Cleanup/optimization  |         Status:  new
              Component:  Migrations            |        Version:  master
               Severity:  Normal                |       Keywords:
           Triage Stage:  Unreviewed            |      Has patch:  0
    Needs documentation:  0                     |    Needs tests:  0
Patch needs improvement:  0                     |  Easy pickings:  0
                  UI/UX:  0                     |
------------------------------------------------+------------------------
 Slowness around the optimizer is tracked in #22608. This ticket is
 specifically targeted to slowness with the `migrate` command. To repeat a
 comment previously done in #22608, each migration in the Django test suite
 is taking up 3.5 seconds. That should be improved.

 Profiling migrations in the current test suite:
 {{{
    ncalls  tottime  percall  cumtime  percall filename:lineno(function)
         1    0.000    0.000   27.714   27.714
 django/db/migrations/executor.py:55(migrate)
         8    0.000    0.000   27.714    3.464
 django/db/migrations/executor.py:83(apply_migration)
         8    0.042    0.005   13.157    1.645
 django/db/migrations/executor.py:128(detect_soft_applied)
         8    0.000    0.000   14.500    1.812
 django/db/migrations/migration.py:79(apply)
         8    0.042    0.005   12.945    1.618
 django/db/migrations/operations/models.py:32(database_forwards)
        17    0.094    0.006   27.447    1.615
 django/db/migrations/state.py:42(ProjectState.render)
     21511    0.791    0.000   21.881    0.001
 django/db/migrations/state.py:293(ModelState.render)
     21488    0.549    0.000    5.290    0.000
 django/db/migrations/state.py:164(ModelState.from_model)
 21515/21511    0.766    0.000   15.861    0.001
 django/db/models/base.py:63(ModelBase.__new__)
 }}}

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

Reply via email to