hello all i'm about to venture into building a ZClass that will make use of ZCatalog. is it 'safe' now? i see that my zope2.2.2 now haven't encountered any random key error yet. what about others? also, will iterating through catalog index faster than iterating through ..say.. objectItems('meta-type')? looking for insight, advice, holes to avoid, etc thanks -- http://www.kedai.com.my/kk http://www.kedai.com.my/eZine use Zope? then you got HOPE!
On Fri, 10 Nov 2000, Bak @ kedai wrote:
also, will iterating through catalog index faster than iterating through ..say.. objectItems('meta-type')?
Much faster. Much, much faster. I tried an objectValues() on 2000 items (in 3 different folder-type objects) and did various calculations on each object, it took me 20 sec. to render the page. On the same box the Catalog return a search (much wider than the one on 2000 objects) on 15000 items (indexd, natuarally) within a second or two. Hm. I might be getting out on thin ice now, but I think it depends on what you want to do with the objects you get back from your iteration. If you just are looking for simple attributes, the Catalog should suffice, but it (the Catalog) might be slower if you are doing something with the objects, since it has to fetch them first - and the objectValues() returns the object. I'm not sure about this, though, the source code should help you a lot (I think objectValues() and objectItems() and those alike are in lib/python/ObjectManager.py - around line 350). Come to think of it. You did say objectItems(), and I've described the objectValues(). I don't think you can compare the Catalog and objectItems(), since objectItems() returns a list of (id, subobject) tuples and thus gives you context - something the Catalog cannot do (unless you hack it.. yeah Catalog wizards?). I might be wrong though :)
You will still see random key errors until Chris Petrilli puts his ZCatalog fixes into the 2.2 branch (hopefully 2.2.3). ----- Original Message ----- From: "Bak @ kedai" <kedai@kedai.com.my> To: <zope@zope.org> Sent: Thursday, November 09, 2000 11:56 PM Subject: [Zope] ZCatalog and random key error
hello all i'm about to venture into building a ZClass that will make use of ZCatalog. is it 'safe' now? i see that my zope2.2.2 now haven't encountered any random key error yet. what about others?
also, will iterating through catalog index faster than iterating through ..say.. objectItems('meta-type')?
looking for insight, advice, holes to avoid, etc
thanks
--
http://www.kedai.com.my/kk http://www.kedai.com.my/eZine
use Zope? then you got HOPE!
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (3)
-
Bak @ kedai -
Chris McDonough -
Erik Enge