Re: Is there any plan to improve the performance of "render"?

147 views
Skip to first unread message

Aymeric Augustin

unread,
Sep 12, 2012, 4:35:24 PM9/12/12
to django-d...@googlegroups.com
Le 12 sept. 2012 à 18:56, 富弘刘 <lfh...@gmail.com> a écrit :

I use django-debug-toolbar to analyze my website and noticed a lot of time is consumed by template render. In my each page, I have about 10ms in database queries, and about 100 ms in render.


Hi Fuhong,

Yes, the Django Template Language is known to be rather slow.

Compiling it is a very hard problem, for two reasons:
- its scoping semantics don't match Python's (unlike Jinja2, for example);
- custom template tags can dynamically implement arbitrary behavior.

The outcome of the latest attempt is documented here:

I'm not aware of more recent work on this topic.

Best regards,

-- 
Aymeric.



Karen Tracey

unread,
Sep 12, 2012, 9:00:37 PM9/12/12
to django-d...@googlegroups.com
On Wed, Sep 12, 2012 at 12:56 PM, 富弘刘 <lfh...@gmail.com> wrote:
I use django-debug-toolbar to analyze my website and noticed a lot of time is consumed by template render. In my each page, I have about 10ms in database queries, and about 100 ms in render. 

Have you tried using the cached template loader (see https://docs.djangoproject.com/en/1.4/ref/templates/api/#loader-types)?

Karen

富弘刘

unread,
Sep 13, 2012, 8:16:48 AM9/13/12
to django-d...@googlegroups.com
Thanks for your reply.
--Fuhong

富弘刘

unread,
Sep 13, 2012, 8:20:21 AM9/13/12
to django-d...@googlegroups.com
No, I have several 3rd party apps in my website and I haven't confirmed they are "thread safe". I'll check this later. Thanks:D
Reply all
Reply to author
Forward
0 new messages