#28057: Admin inlines very slow to render
------------------------------------------+-------------------------------
               Reporter:  Marc DEBUREAUX  |          Owner:  nobody
                   Type:  Bug             |         Status:  new
              Component:  contrib.admin   |        Version:  1.11
               Severity:  Normal          |       Keywords:  admin inlines
           Triage Stage:  Unreviewed      |      Has patch:  0
    Needs documentation:  0               |    Needs tests:  0
Patch needs improvement:  0               |  Easy pickings:  0
                  UI/UX:  1               |
------------------------------------------+-------------------------------
 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.


 {{{
 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)]]

--
Ticket URL: <https://code.djangoproject.com/ticket/28057>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.c1b9ea2e87dd58d4c48a4aeab9861829%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to