Opened 18 years ago
Closed 18 years ago
#3067 closed defect (fixed)
[patch] Caching of servername in mail.py slows down startup time
Reported by: | Chris Beaven | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | Core (Mail) | Version: | |
Severity: | normal | Keywords: | |
Cc: | 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
Especially when running the development server! Every time code changes it can take up to a couple of seconds to restart (before the patch in #3007 it was noticeably faster).
I wrote the initial change to cache the dns name, and while that's still a good idea it would be better to do it lazily instead. Patch attached.
Attachments (1)
Change History (5)
by , 18 years ago
Attachment: | better_servername_caching.patch added |
---|
comment:1 by , 18 years ago
Component: | Core framework → django.core.mail |
---|
comment:2 by , 18 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
comment:3 by , 18 years ago
comment:4 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
It's more normal Python practice to use
__str__
for "transparent output" classes like this, so that__repr__
can still be used in debugging, etc, to display the real object (the class instance). I've made that change in the patch I've applied to the repository.