﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
35026	Improving perfromance of the apps registry `get_models()` method	Kamil Paduszyński	nobody	"When studying the ""applications"" framework, I noticed that in `django.apps.apps.get_models()` you mention in the comment.

> This method is performance-critical at least for Django's test suite.

If fact, the method involves a standard list extenstions. Has anyone consider to implement this using `itertools.chain`?

{{{
#!python
from itertools import chain

# ...

def get_models(self, include_auto_created=False, include_swapped=False):
    return chain(
        *(app_config.get_models(include_auto_created, include_swapped)
        for app_config in self.get_app_configs())
    )
}}}

Shouldn't using a generator result in increased performance?"	Cleanup/optimization	closed	Database layer (models, ORM)	5.0	Normal	wontfix	apps, models		Unreviewed	0	0	0	0	0	0
