Changes between Initial Version and Version 2 of Ticket #24224


Ignore:
Timestamp:
Jan 30, 2015, 1:09:24 AM (9 years ago)
Author:
TorstenRottmann
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #24224 – Description

    initial v2  
    1 When requesting an '''sqlmigrate''' (or when do a '''test''' or '''migrate''' also), it takes a very long time to compute the sql for a particular app migration. This app has some 78 models and is highly interconnected with ForeignKeys (100+).[[BR]]
     1When requesting an '''sqlmigrate''' (or when doing a '''test''' or '''migrate''' also), it takes a very long time to compute the sql for a particular app migration. This app has some 78 models and is highly interconnected with ForeignKeys (100+).[[BR]]
    22
    33I ran the '''sqlmigrate''' through the profiler an got these results:[[BR]]
    44
    55{{{
    6          74628418 function calls (74229555 primitive calls) in 3653.843 seconds
     6         74628367 function calls (74229507 primitive calls) in 132.448 seconds
    77
    88   Ordered by: internal time
    99
    1010   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
    11         4 3519.805  879.951 3519.805  879.951 {method 'write' of 'file' objects}
    12    552977   18.609    0.000   29.893    0.000 __init__.py:292(deconstruct)
    13     40096   14.244    0.000   20.051    0.001 related.py:276(swappable_setting)
    14    318698   11.924    0.000   21.114    0.000 __init__.py:1011(__init__)
    15    575182    9.569    0.000   12.634    0.000 __init__.py:123(__init__)
    16    571729    7.336    0.000   97.027    0.000 state.py:277(construct_fields)
    17 16773896/16722010    6.750    0.000    6.790    0.000 {getattr}
    18     85138    2.849    0.000    4.883    0.000 __init__.py:1092(__init__)
    19 553122/553106    2.546    0.000    6.503    0.000 {__import__}
    20 637429/318719    1.916    0.000    2.146    0.000 deconstruct.py:15(__new__)
    21   3236790    1.912    0.000    1.912    0.000 {method 'startswith' of 'unicode' objects}
    22 3881367/3881365    1.891    0.000    4.462    0.000 {isinstance}
    23   5915601    1.566    0.000    1.841    0.000 options.py:283(_swapped)
    24     43868    1.525    0.000    1.525    0.000 base.py:33(subclass_exception)
    25    901715    1.508    0.000    2.571    0.000 abc.py:128(__instancecheck__)
    26 21946/19820    1.486    0.000   24.646    0.001 base.py:61(__new__)
     11   552977   18.515    0.000   29.690    0.000 __init__.py:292(deconstruct)
     12    40096   14.144    0.000   19.827    0.000 related.py:276(swappable_setting)
     13   318698   11.825    0.000   20.907    0.000 __init__.py:1011(__init__)
     14   575182    9.425    0.000   12.465    0.000 __init__.py:123(__init__)
     15   571729    7.252    0.000   96.117    0.000 state.py:277(construct_fields)
     1616773892/16722006    6.668    0.000    6.707    0.000 {getattr}
     17    85138    2.822    0.000    4.825    0.000 __init__.py:1092(__init__)
     18553122/553106    2.799    0.000    6.470    0.000 {__import__}
     19637429/318719    1.908    0.000    2.137    0.000 deconstruct.py:15(__new__)
     20  3236790    1.900    0.000    1.900    0.000 {method 'startswith' of 'unicode' objects}
     213881364/3881362    1.884    0.000    4.418    0.000 {isinstance}
     22  5915601    1.548    0.000    1.812    0.000 options.py:283(_swapped)
     23    43868    1.507    0.000    1.507    0.000 base.py:33(subclass_exception)
     24   901714    1.491    0.000    2.534    0.000 abc.py:128(__instancecheck__)
     2521946/19820    1.472    0.000   24.363    0.001 base.py:61(__new__)
     26  2395625    1.467    0.000    1.467    0.000 {hasattr}
     27 11291797    1.448    0.000    1.460    0.000 {method 'get' of 'dict' objects}
     28   298364    1.394    0.000    6.343    0.000 __init__.py:572(contribute_to_class)
     29553078/553076    1.375    0.000    8.543    0.000 __init__.py:20(import_module)
    2730...
    2831}}}
Back to Top