Re: [Zope-CMF] [CMF 2.1] opaque items calls make performance issue
Charlie Clark a écrit : > Am 09.08.2009, 04:48 Uhr, schrieb Martin Aspeli : > > self_base = aq_base(self) for name in self_base.__dict__.keys() obj = getattr(self, name) if ICallableOpaqueItem.providedBy(obj): items.append((obj.getId(), obj)) >> That's just *nuts*! >> > > From my previous answer to this which I forgot to send to the list as well > - can we change the list settings so that answers go to it by default? > > > CMF maintains pretty extensive backwards compatability. > > A similar question came up a couple of years ago and produced this > response from Tres: > > http://mail.zope.org/pipermail/zope-cmf/2007-March/025754.html > > ie. there is no reason why this should not be deprecated and replaced. > > Returning to the original questions: > > But z2ICallableOpaqueItem is a Zope2 interface and I m not used to this > kind of object. It seems they are generated on runtime, so for me it's > hard to debug. > > No, it's simply renamed on import in CMFCatalogAware > > * What are opaqueitems (any example ? I don't have find anything usefull > in tests of CMFCore) > > """ Interface for callable opaque items. > > o Opaque items are subelements that are contained using something that >is not an ObjectManager. > > o On add, copy, move and delete operations, a marked opaque items >'manage_afterAdd', 'manage_afterClone' and 'manage_beforeDelete' >hooks get called if available. Unavailable hooks do not throw >exceptions. > """ > > DiscussionItems are ICallableOpaqueItems > > * Is zope2 interface are still used and why ? > > For anything that uses OpaqueItems. From Tres' post it's pretty unlikely > that this is the case. The z2I "import as" has been removed in CMF trunk. > > * How could I replace those calls, or improved this code that always > return an empty tuple > > In you own deployments I suggest simply overriding the code to do just > that. > > Charlie > Thank you Charlie for this answer and this "Read The Fucking Interfaces" ;) . I have done a simple egg that override the code: http://pypi.python.org/pypi/experimental.aggressiveopaquespeedup/ - JeanMichel FRANCOIS aka toutpt ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests
Re: [Zope-CMF] [CMF 2.1] opaque items calls make performance issue
Am 09.08.2009, 04:48 Uhr, schrieb Martin Aspeli : >>> self_base = aq_base(self) >>> for name in self_base.__dict__.keys() >>>obj = getattr(self, name) >>>if ICallableOpaqueItem.providedBy(obj): >>> items.append((obj.getId(), obj)) > That's just *nuts*! From my previous answer to this which I forgot to send to the list as well - can we change the list settings so that answers go to it by default? CMF maintains pretty extensive backwards compatability. A similar question came up a couple of years ago and produced this response from Tres: http://mail.zope.org/pipermail/zope-cmf/2007-March/025754.html ie. there is no reason why this should not be deprecated and replaced. Returning to the original questions: But z2ICallableOpaqueItem is a Zope2 interface and I m not used to this kind of object. It seems they are generated on runtime, so for me it's hard to debug. No, it's simply renamed on import in CMFCatalogAware * What are opaqueitems (any example ? I don't have find anything usefull in tests of CMFCore) """ Interface for callable opaque items. o Opaque items are subelements that are contained using something that is not an ObjectManager. o On add, copy, move and delete operations, a marked opaque items 'manage_afterAdd', 'manage_afterClone' and 'manage_beforeDelete' hooks get called if available. Unavailable hooks do not throw exceptions. """ DiscussionItems are ICallableOpaqueItems * Is zope2 interface are still used and why ? For anything that uses OpaqueItems. From Tres' post it's pretty unlikely that this is the case. The z2I "import as" has been removed in CMF trunk. * How could I replace those calls, or improved this code that always return an empty tuple In you own deployments I suggest simply overriding the code to do just that. Charlie -- Charlie Clark Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-938-5360 GSM: +49-178-782-6226 ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests
[Zope-CMF] CMF Tests: 3 OK
Summary of messages to the cmf-tests list. Period Sat Aug 8 12:00:00 2009 UTC to Sun Aug 9 12:00:00 2009 UTC. There were 3 messages: 3 from CMF Tests. Tests passed OK --- Subject: OK : CMF-2.1 Zope-2.10 Python-2.4.6 : Linux From: CMF Tests Date: Sat Aug 8 21:15:04 EDT 2009 URL: http://mail.zope.org/pipermail/cmf-tests/2009-August/011858.html Subject: OK : CMF-trunk Zope-2.12 Python-2.6.2 : Linux From: CMF Tests Date: Sat Aug 8 21:17:04 EDT 2009 URL: http://mail.zope.org/pipermail/cmf-tests/2009-August/011859.html Subject: OK : CMF-trunk Zope-trunk Python-2.6.2 : Linux From: CMF Tests Date: Sat Aug 8 21:19:04 EDT 2009 URL: http://mail.zope.org/pipermail/cmf-tests/2009-August/011860.html ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests