Template Rendering Django 1.11

103 views
Skip to first unread message

Matthew Pava

unread,
Aug 4, 2017, 5:37:59 PM8/4/17
to django...@googlegroups.com

I finally made the leap to Django 1.11 from 1.10.  I thought that I needed to use the new Subquery, but it turned out that I was able to solve my problem without using it.  Good news for sure!

 

However, I have noticed that my forms are loading more slowly.

 

We discovered that when we were using crispy-forms, which we still do, that there was a bottleneck when including all the widget templates and the template inheritance involved in rendering the widgets and finally the final outcome.

 

And this leads me to conclude that the new widget rendering from templates built in to Django 1.11 is the bottleneck as well.  Does anyone else experience this issue?  Is there a workaround?

Tim Graham

unread,
Aug 5, 2017, 9:24:57 PM8/5/17
to Django users, Matthe...@iss.com
Are you using the cached template loader? It may mitigate the problem to some extent.
https://docs.djangoproject.com/en/1.11/ref/templates/api/#django.template.loaders.cached.Loader

As of Django 1.11, it's enabled if DEBUG is False and OPTIONS['loaders'] isn’t specified.

Tim Graham

unread,
Aug 7, 2017, 5:03:13 PM8/7/17
to django...@googlegroups.com, Matthew Pava
You'll have to profile and see what's slow.

On Mon, Aug 7, 2017 at 4:55 PM, Matthew Pava <Matthe...@iss.com> wrote:

I suppose that helps a little bit.  I added the loaders option with Debug=True.  I assume that enables the cache loader.

Any other ideas?  The speed different is really unacceptable right now.

Matthew Pava

unread,
Aug 16, 2017, 6:27:50 PM8/16/17
to django...@googlegroups.com

I found the problem was with a third-party app that was designed for older versions of Django.  I was able to correct it and all is well with Django 1.11.

 

The app was django-autocomplete-light v2.2.  I never adopted the v3.  Since v3 was created, I actually incorporated v2.2 into my project to be able to modify it for our requirements, and it is no longer the same app.

Reply all
Reply to author
Forward
0 new messages