#12389: performance enhancement for testsuite
------------------------------------------------------------+---------------
Reporter: Travis Cline <[email protected]> | Owner:
nobody
Status: closed | Milestone:
1.2
Component: Core framework | Version:
SVN
Resolution: fixed | Keywords:
Stage: Ready for checkin | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
------------------------------------------------------------+---------------
Comment (by lukeplant):
FYI, I tweaked the patch in a few ways, in the spirit of micro-
optimisation:
1. Used try/except to avoid doing two dictionary lookups.
2. Moved cache check before {{{self._populate()}}} call.
3. Used a tuple as the cache key, rather than a string, mainly for
simplicity and clarity.
Only the last of these had any measurable effect at all, and not much, but
they made me feel better :-)
--
Ticket URL: <http://code.djangoproject.com/ticket/12389#comment:3>
Django <http://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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.