Django

Code

Show
Ignore:
Timestamp:
08/06/08 10:32:46 (5 months ago)
Author:
jacob
Message:

Major refactoring of django.dispatch with an eye towards speed. The net result is that signals are up to 90% faster.

Though some attempts and backwards-compatibility were made, speed trumped compatibility. Thus, as usual, check BackwardsIncompatibleChanges for the complete list of backwards-incompatible changes.

Thanks to Jeremy Dunck and Keith Busell for the bulk of the work; some ideas from Brian Herring's previous work (refs #4561) were incorporated.

Documentation is, sigh, still forthcoming.

Fixes #6814 and #3951 (with the new dispatch_uid argument to connect).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/contrib/sites/management.py

    r7723 r8223  
    33""" 
    44 
    5 from django.dispatch import dispatcher 
    65from django.db.models import signals 
    76from django.contrib.sites.models import Site 
    87from django.contrib.sites import models as site_app 
    98 
    10 def create_default_site(app, created_models, verbosity): 
     9def create_default_site(app, created_models, verbosity, **kwargs): 
    1110    if Site in created_models: 
    1211        if verbosity >= 2: 
     
    1615    Site.objects.clear_cache() 
    1716 
    18 dispatcher.connect(create_default_site, sender=site_app, signal=signals.post_syncdb
     17signals.post_syncdb.connect(create_default_site, sender=site_app