Django

Code

Ticket #3067 (closed: fixed)

Opened 2 years ago

Last modified 2 years ago

[patch] Caching of servername in mail.py slows down startup time

Reported by: SmileyChris Assigned to: adrian
Milestone: Component: django.core.mail
Version: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

better_servername_caching.patch (0.7 kB) - added by SmileyChris on 11/26/06 17:36:15.

Change History

11/26/06 17:36:15 changed by SmileyChris

  • attachment better_servername_caching.patch added.

11/26/06 18:04:25 changed by adrian

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

01/17/07 23:47:23 changed by SmileyChris

  • stage changed from Unreviewed to Ready for checkin.

02/17/07 00:00:38 changed 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.

02/17/07 00:01:17 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #3067 ([patch] Caching of servername in mail.py slows down startup time)




Change Properties
Action