Opened 17 years ago

Closed 17 years ago

#3235 closed enhancement (duplicate)

[patch] resolve_variable performance issue raising VariableDoesNotExist

Reported by: Karen Tracey <kmtracey@…> Owned by: Adrian Holovaty
Component: Template system Version:
Severity: normal Keywords:
Cc: kmtracey@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

This has come up a couple of times on django-users: the raising of VariableDoesNotExist in resolve_variable can potentially cause a big performance hit since it may result in the entire template context being stuffed into a string. See:

http://groups.google.com/group/django-users/browse_thread/thread/60332a3ab2a14fb2/ed01f52525c9af02#ed01f52525c9af02

and

http://groups.google.com/group/django-users/browse_thread/thread/82df8bb71571fdbf/35089038df9c1976

I'll attach a patch with (what I think is) Russ Magee's suggested fix of simply including the type of object being searched instead of a full repr of it.

Attachments (1)

__init__.py.diff (795 bytes ) - added by Karen Tracey <kmtracey@…> 17 years ago.

Download all attachments as: .zip

Change History (5)

by Karen Tracey <kmtracey@…>, 17 years ago

Attachment: __init__.py.diff added

comment:1 by Karen Tracey <kmtracey@…>, 17 years ago

Summary: resolve_variable performance issue raising VariableDoesNotExist[patch] resolve_variable performance issue raising VariableDoesNotExist

comment:2 by Karen Tracey <kmtracey@…>, 17 years ago

Cc: kmtracey@… added

comment:3 by Simon G. <dev@…>, 17 years ago

Triage Stage: UnreviewedReady for checkin

comment:4 by Karen Tracey <kmtracey@…>, 17 years ago

Resolution: duplicate
Status: newclosed

#3441 fix addressed this problem; full message still available if it's ever requested but up-front creation cost is gone.

Note: See TracTickets for help on using tickets.
Back to Top