zop Am 21.11.2008 um 07:31 schrieb Andreas Jung: > hmm....so why is CMF here nearly as bad a Plone. In Plone we know > that everything is indexed various times (also in CMF I think) but > Plone has much more indexes and metadata compared to CMF. A request > in Plone goes through much more layers than in CMF....I am currently > clueless interpreting the results. My current interpretation is: a > custom CMF-based implementation of a CMS will be comparable slow/ > fast as an out-of-the-box solution?!
Hi Andreas, a very interesting situation. I've never thought of object creation when choosing "pure" CMF over Plone as this is largely a ZODB issue. As Roché points out it is less likely to be the transactions and more likely to be the cataloguing and any other event subscribers that are limiting factors here. Speed comparions between CMF and Plone only make sense for serving content where I find pure CMF to be at least 10 times as fast as Plone - I think the speed difference is largely down to the sheer size of Archetypes and the overloading of getattr(). For tests you might want to see if you can defer indexing and I'd suggest explicit transaction management. Any chance you can run the tests outside the ZMI? I currently have a migration from Plone to CMF and this is a bit of the code I use. import transaction from zope.component import createObject from zope.app.container.interfaces import INameChooser from zope.event import notify from zope.lifecycleevent import ObjectCreatedEvent for i in range(randint(1,500)): d = createObject("cmf.document", "") d.id = INameChooser(results_folder).chooseName(d.getId(), d) # this will be a bottleneck results_folder._setObject(d.id, d) transaction.commit() for obj in results_folder.contentValues(filter='Document'): notify(ObjectCreatedEvent(d)) You can run this to see the time it takes to create the invidiual objects. You could run the transaction within the loop to see what effect that has and you can add notification of the object creation to the loop or outside of it to see how the event subscribers (usually the portal catalogue) affects things. 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