Opened 12 years ago

Closed 12 years ago

#3067 closed defect (fixed)

[patch] Caching of servername in 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


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)

better_servername_caching.patch (753 bytes) - added by Chris Beaven 12 years ago.

Download all attachments as: .zip

Change History (5)

Changed 12 years ago by Chris Beaven

comment:1 Changed 12 years ago by Adrian Holovaty

Component: Core frameworkdjango.core.mail

comment:2 Changed 12 years ago by Chris Beaven

Triage Stage: UnreviewedReady for checkin

comment:3 Changed 12 years ago by Malcolm Tredinnick

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.

comment:4 Changed 12 years ago by Malcolm Tredinnick

Resolution: fixed
Status: newclosed

(In [4536]) Fixed #3067 -- Improved caching of machine hostname to increase server restart
times. Thanks SmileyChris.

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