﻿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
5891	formset_for_form should put the form's base_fields on the Formset class	Brian Rosner	nobody	"When an inline in an ```InlineModelAdmin``` contains a field that maps to a ```ForeignKey``` and has a ton of options (in my case 5,000+) the add/change pages are '''extremely''' slow.  I began to trace the problem done and it looks like the root of the problem is each ```ModelChoiceField``` has its own instance in memory for each form which results in one query per form in the inline.  This gets worse when there is many ```extra``` forms.  There are really almost two ways to fix this problem and I am proposing to fix the code.  The alternative is to use Javascript to add more ```extra``` forms so only one query is ran.

It looks like it will be better for the Formset to hold the ```base_fields``` and then place it on the ```BaseForm``` class before creating it so only one query would run for each form instance.  Am I missing something here that would cause problems with this kind of solution?"		closed	Forms	newforms-admin		duplicate	nfa-someday		Design decision needed	0	0	0	0	0	0
