Changes between Initial Version and Version 14 of Ticket #12808


Ignore:
Timestamp:
04/22/12 09:16:39 (10 years ago)
Author:
SimonKing
Comment:

I have created an alternative patch (using hg rename). It is smaller than the original patch, but should result in identical code. So, either of the patches could be used, but I guess the smaller patch is easier to read (because one sees more easily the additional differences between classcall_metaclass.py and classcall_metaclass.pyx)

Apply trac_12808-classcall_speedup2.patch

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12808

    • Property Cc nthiery SimonKing added
    • Property Status changed from new to needs_review
  • Ticket #12808 – Description

    initial v14  
    11When a class {{{C}}} is an instance of {{{ClasscallMetaclass}}}, then for any constructor call, the system currently looks for {{{__classcall__}}} and {{{__classcall_private__}}} in {{{C}}}. This adds quite an overhead and this could be cached, assuming no one modifies {{{C}}} (which seems reasonable). Improving this speeds up, in particular, all call to the constructor of a subclass of {{{UniqueRepresentation}}}, eg. many parents, all categories...
     2
     3__Apply__
     4
     5[attachment:trac_12808-classcall_speedup2.patch]