Opened 7 years ago
Last modified 9 days ago
#29898 assigned Cleanup/optimization
Adapt schema editors to operate from model states instead of fake rendered models — at Initial Version
| Reported by: | Simon Charette | Owned by: | nobody |
|---|---|---|---|
| Component: | Migrations | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Markus Holtermann, Simon Charette, Adam Johnson, David Wobrock, Suzannah Cooper | Triage Stage: | Accepted |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
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 https://github.com/django/django/compare/master...MarkusH:schemaeditor-modelstate