#4050: django/db/models/base.py uses inefficient subclass check
---------------------------------------------------------+------------------
   Reporter:  Ludvig Ericson <[EMAIL PROTECTED]>  |                Owner:  
adrian          
     Status:  closed                                     |            
Component:  Database wrapper
    Version:  SVN                                        |           
Resolution:  wontfix         
   Keywords:  issubclass models base.py                  |                
Stage:  Unreviewed      
  Has_patch:  1                                          |           
Needs_docs:  0               
Needs_tests:  0                                          |   
Needs_better_patch:  1               
---------------------------------------------------------+------------------
Changes (by mtredinnick):

  * status:  new => closed
  * resolution:  => wontfix

Comment:

 There's been a lot of effort put into this ticket, but I can't see the
 benefit. The speed up exists, but it's very slight (about 15% on the
 timings I've done -- and the absolute elapsed time is less than a
 microsecond on modern day machines). This particular line of code is
 executed precisely once for each model when the file that defines it is
 imported (the metaclass {{{__new__}}} method is not called when instances
 are created, only when the class object is created). Replacing one line of
 code with three when the existing single line seems pretty clear isn't
 worth it.
 
 Sorry, guys, but this isn't really worth changing.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/4050#comment:11>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to