On 06/23/2011 04:43 PM, Jacob Kaplan-Moss wrote: > 1. Performance: it looks, to me, like rending a basic form is going to > cause dozens of template includes and dozens of sub-renders (the form > loads a form template which loads row templates which load widget > templates). That's dozens of disk hits, and a lot of overhead for form > rendering. I worry about this overhead a lot. Django's performance has > slipped lately, and I'm really afraid this'll make things a lot worse. > > So I'm going to need to see some benchmarks -- particularly in how a > simple {% form myform %} compares to {{ form.as_* }}. > > The wrong performance benchmarks could result in a veto from me; this > is important.
We've had a fair bit of discussion on this, and some benchmarks, around Bruno's work porting django-floppyforms (templated widgets) to a core patch (https://code.djangoproject.com/ticket/15667). The disk hits aren't a big concern to me - if you are at a point where you have to care about template speed, you already need to be using the cached template loader regardless. But just plain rendering speed is a problem - even with just widgets in templates, in some pathological cases (e.g. a ChoiceField with tons of choices) it can be quite significantly slower. Enough so that I put #15667 in the icebox for now, pending seeing the impact of Armin's GSoC. I really think templated form-rendering is a massive improvement in Django for front-end devs, so I'm very hopeful that Armin's work can make rendering speed a non-issue. No pressure, Armin ;-) Carl -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.