Klaas van Schelven  committed 31db57b

Performance fix: don't do double work in inner_problem_check()

More elegant solutions may be imagined. But this works.

  • Participants
  • Parent commits 0ea4e7e

Comments (0)

Files changed (1)

File south/migration/

 def inner_problem_check(problems, done, verbosity):
     "Takes a set of possible problems and gets the actual issues out of it."
     result = []
+    checked = set([])
     for last, migration in problems:
         # 'Last' is the last applied migration. Step back from it until we
         # either find nothing wrong, or we find something.
         to_check = list(last.dependencies)
         while to_check:
             checking = to_check.pop()
+            if checking in checked:
+                continue
+            checked.add(checking)
             if checking not in done:
                 # That's bad. Error.
                 if verbosity: