#15667: Implement template-based widget rendering ---------------------------------------+-------------------------- Reporter: brutasse | Owner: brutasse Type: New feature | Status: new Milestone: 1.4 | Component: Forms Version: | Severity: Normal Resolution: | Keywords: Triage Stage: Accepted | Has patch: 1 Needs documentation: 1 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 ---------------------------------------+--------------------------
Comment (by akaariai): I have a feeling there is not much that can be done in this ticket to improve the speed of MultipleChoiceField (or ChoiceField for that matter). Current implementation of Django templates is just a bit slow. Maybe it would be best to bring this up in django-developers for design decision? Or mark this ticket design decision needed? As I see it, there are three ways forward: 1. Accept the performance loss. For some users of 1.3 this can be a decision which makes their current application unusable in 1.4. 2. Decide that the performance loss is unacceptable. In this case, this ticket should wait for a faster implementation of Django template rendering. Personally, I have high hopes that the GSOC project of Armin Ronacher will achieve this. 3. Keep the default implementation of the performance-problematic widgets in Python. One could still use template based rendering for these widgets, but by default the python implementation would be used. This is a bit uqly, but would allow this feature to get in without big worries of performance problems for users upgrading to 1.4. One small thing that could theoretically have an impact on performance is the usage of context.update in get_context subclass methods. This is creating a new stack entry in the context which can slow down variable resolution. But as choices are in the upmost stack entry, this should not have a big impact. Still, it would be IMHO cleaner if there would be just one stack entry in the context given to the template. -- Ticket URL: <http://code.djangoproject.com/ticket/15667#comment:26> 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 post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.