﻿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
28057	Admin inlines very slow to render	Marc DEBUREAUX	nobody	"When using inlines in Django admin, it renders very poorly even when creating a new element (so no data to load, database time always the same).

And the higher the number in ""extra"" parameter, the longer it takes to load the form.

**Works well with Django 1.10**


{{{
class EffectModifierInline(admin.TabularInline):
    model = EffectModifier
    extra = 1


@admin.register(Effect)
class EffectAdmin(admin.ModelAdmin):
    fieldsets = (
        # Whatever
    )
    inlines = [EffectModifierInline]
    # TODO:
    list_display = ()
    list_editable = ()
    list_filter = ()

    def get_queryset(self, request):
        return super().get_queryset(request).prefetch_related('modifiers')
}}}

''With 15 inlines''
[[Image(https://cdn.pbrd.co/images/1VQk4eH7X.png)]]

''With only 1 inline''
[[Image(https://cdn.pbrd.co/images/1VSyev0B9.png)]]

''With no inline''
[[Image(https://cdn.pbrd.co/images/1VTx3aMU3.png)]]
"	Bug	new	contrib.admin	1.11	Normal		admin inlines		Unreviewed	0	0	0	0	0	1
