Changes between Initial Version and Version 1 of Ticket #33848


Ignore:
Timestamp:
Jul 15, 2022, 5:46:04 PM (22 months ago)
Author:
Iuri de Silvio
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #33848 – Description

    initial v1  
    11`StateApps.clone` execute two slow deep copies. The first one copy all models. The second one copy app configs, that include all apps and the specific app models.
    22
    3 In my application, with ~250 models, this deepcopy is around 5% of migration time. I was able to cleanup `StateApps` before copy, to not copy all models and apps every operation again.
     3In my application, with ~250 models, this deepcopy is around 5% of migration time. I was able to cleanup `StateApps` before copy, to not copy all models and apps every operation again. After the optimization, it takes less than 1% of migration time.
    44
    55https://github.com/django/django/blob/d4c5d2b52c897ccc07f04482d3f42f976a79223c/django/db/migrations/state.py#L683
Back to Top