Opened 10 years ago

Closed 9 years ago

#3067 closed defect (fixed)

[patch] Caching of servername in slows down startup time

Reported by: SmileyChris Owned by: adrian
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: UI/UX:


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 SmileyChris 10 years ago.

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by SmileyChris

comment:1 Changed 10 years ago by adrian

  • Component changed from Core framework to django.core.mail

comment:2 Changed 9 years ago by SmileyChris

  • Triage Stage changed from Unreviewed to Ready for checkin

comment:3 Changed 9 years ago by mtredinnick

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 9 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

(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