#36869: Optimise migration graph planning
-------------------------------------+-------------------------------------
Reporter: James Fysh | Owner: nessita
Type: | <124304+nessita@…>
Cleanup/optimization | Status: closed
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: migration digraph | Triage Stage: Accepted
loader |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by nessita <124304+nessita@…>):
* owner: (none) => nessita <124304+nessita@…>
* resolution: => fixed
* status: new => closed
Comment:
In [changeset:"59fcd2a1990775d9e893a44a45222d8a54112570" 59fcd2a]:
{{{#!CommitTicketReference repository=""
revision="59fcd2a1990775d9e893a44a45222d8a54112570"
Fixed #36869 -- Optimized MigrationGraph._generate_plan membership checks.
Previously, `_generate_plan()` relied on list membership checks,
resulting in quadratic behavior as the plan grew. On large migration
graphs this became a significant performance bottleneck.
This change uses `OrderedSet` for the plan, reducing the complexity to
linear while preserving insertion order and behavior.
Co-authored-by: Nick Pope <[email protected]>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36869#comment:4>
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 view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019bd7a8bc57-8269394d-c209-4d04-ad87-d5a84272c6bf-000000%40eu-central-1.amazonses.com.