[Zope-dev] zope.interface memory optimization

Brian Sutherland brian at vanguardistas.net
Tue Nov 9 19:40:34 EST 2010


On Wed, Nov 10, 2010 at 12:14:54AM +0200, Marius Gedminas wrote:
> On Tue, Nov 09, 2010 at 05:04:11PM +0100, Brian Sutherland wrote:
> > > Might be worth timing a slots-based implementation.
> > 
> > I just tried to add slots to Element, Attribute and Method classes, but
> > it there's too many tests that break to benchmark it running the ZTK
> > tests.
> > 
> > On the micro benchmarks, the only difference I see is a memory
> > improvement which I think will not survive in practice because most 
> 
> ... ?

Er, somehow my thoughts didn't make it into text:

attributes are zope.schema fields (i.e. subclasses of Attribute).

To really make that work, you'd have to add __slots__ to most of the
classes in zope.schema as well.

> 
> 
> Marius Gedminas
> -- 
> http://pov.lt/ -- Zope 3/BlueBream consulting and development



> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev at zope.org
> https://mail.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists - 
>  https://mail.zope.org/mailman/listinfo/zope-announce
>  https://mail.zope.org/mailman/listinfo/zope )


-- 
Brian Sutherland


More information about the Zope-Dev mailing list