Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Avoid an O(n**2) operation where O(n) will suffice. Possibly worth a …

…second or two when running the test suite.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14433 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit ed51dd5d644428a838861c58cda220a21b1523a8 1 parent 89219a6
@alex alex authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 django/db/backends/__init__.py
View
6 django/db/backends/__init__.py
@@ -631,8 +631,10 @@ def installed_models(self, tables):
for model in models.get_models(app):
if router.allow_syncdb(self.connection.alias, model):
all_models.append(model)
- return set([m for m in all_models
- if self.table_name_converter(m._meta.db_table) in map(self.table_name_converter, tables)
+ tables = map(self.table_name_converter, tables)
+ return set([
+ m for m in all_models
+ if self.table_name_converter(m._meta.db_table) in tables
])
def sequence_list(self):
Please sign in to comment.
Something went wrong with that request. Please try again.