[Checkins] SVN: zope.interface/trunk/src/zope/interface/interface.py using `__setattr__` instead of `property` speeds up zope start-up time again, since getting the value for `__bases__` through `__dict__` adds up with almost 200.000 calls; of course, there's some overhead, since `__setattr__` gets called for the other attributes as well, but overall start-up is still faster

Andreas Zeidler az at zitc.de
Wed Jan 9 04:40:02 EST 2008


On Jan 6, 2008, at 8:27 PM, Jim Fulton wrote:
> This change breaks assigning to __class__, which the twisted folks  
> depend on.

hmm, sorry about that.  it didn't break the zope tests, so it looked  
okay at the time, but should be reverted in that case...

> What impact does this change have on startup time?  How did you  
> measure it?

i don't remember the exact speedup, but i think it wasn't that much,  
not more than half a second when starting up zope with the products  
necessary for plone installed.  and i used the profilehooks package to  
measure.

cheers,


andi

ps: btw, would you mind looking into https://bugs.launchpad.net/zc.buildout/+bug/158756 
  again?  it's still pending and keeps biting people...

> On Nov 1, 2007, at 2:29 PM, Andreas Zeidler wrote:
>> Log message for revision 81363:
>> using `__setattr__` instead of `property` speeds up zope start-up  
>> time again, since getting the value for `__bases__` through  
>> `__dict__` adds up with almost 200.000 calls;  of course, there's  
>> some overhead, since `__setattr__` gets called for the other  
>> attributes as well, but overall start-up is still faster
>>
>> Changed:
>> U   zope.interface/trunk/src/zope/interface/interface.py

--
zeidler it consulting - http://zitc.de/ - info at zitc.de
friedelstraße 31 - 12047 berlin - telefon +49 30 25563779
pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/
plone 3.0.4 released! -- http://plone.org/products/plone

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/checkins/attachments/20080109/95611004/PGP.bin


More information about the Checkins mailing list