Opened 3 years ago

Last modified 2 weeks ago

#29898 assigned Cleanup/optimization

Adapt schema editors to operate from model states instead of fake rendered models

Reported by: Simon Charette Owned by: Manav Agarwal
Component: Migrations Version: dev
Severity: Normal Keywords:
Cc: Markus Holtermann, Simon Charette, Adam Johnson, David Wobrock Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no


Rendering models meant to be passed to the schema editor during the migrate phase is the main source of slowdown during the migrate phase of a project.

Adapting schema editors to be able to perform the same operations with model states would be way more efficient as model rendering could always be delayed until it's a necessity such during the application of RunPython operations.

Ref #22608.

Initial work by Markus Holtermann here

Change History (6)

comment:1 Changed 21 months ago by Adam Johnson

Cc: Adam Johnson added

comment:2 Changed 14 months ago by Sanskar Jaiswal

Hello everyone. This is the proposal that I submitted for GSoC, which unfortunately wasn't accepted. If it's fine, I would still like to work on this ticket. It would be amazing if I could get the above mentioned proposal reviewed and was given feedback, so that I know what to change and how to proceed.


comment:3 Changed 2 months ago by Manav Agarwal

Owner: changed from nobody to Manav Agarwal
Status: newassigned

comment:4 Changed 6 weeks ago by Mariusz Felisiak <felisiak.mariusz@…>

In d718d990:

Refs #29898 -- Moved django.db.migrations.operations.utils to django.db.migrations.utils.

comment:5 Changed 5 weeks ago by Mariusz Felisiak <felisiak.mariusz@…>

In 503ee414:

Refs #29898 -- Moved state_forwards()'s logic from migration operations to ProjectState.

Thanks Simon Charette and Markus Holtermann for reviews.

comment:6 Changed 2 weeks ago by David Wobrock

Cc: David Wobrock added
Note: See TracTickets for help on using tickets.
Back to Top