Opened 9 years ago

Last modified 9 years ago

#25892 closed Cleanup/optimization

SeparateDatabaseAndState database_backwards is slow. — at Initial Version

Reported by: Amos Onn Owned by: Amos Onn
Component: Migrations Version: 1.8
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The database_backwards of SeparateDatabaseAndState runs at O(n2) where n is the number of database_operations. For each operation, it regenerates the state up to it from the first operation. Instead, we could cache all the intermediate states, similar to the implementation of _migrate_all_backwards in the migration executor (or migrate in django 1.8.x).

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top