django/django — pull request #3551 by twidi (2014-11-15 20:44:15+00:00)
Title: Reduce calls to state.render in migrations

`state.render` is actually very long, so this commit easily reduce the
number of times it needs to be called by moving some calls only after
`allowed_to_migrate` was called (to avoid calling render states we won't
need)

And in `allowed_to_migrate`, avoid calling `allow_migrate` if not needed.

No new tests because the full test suit still pass and there is nothing new.