[Zope] ZCatalog queries performance

Sebastian Tänzer st at taenzer.me
Sun May 17 17:09:49 CEST 2015


Hello,

I’m querying a ZCatalog with a lot of indexes and some meta data for event objects to get related events by tags.
These need to be displayed with a title image (which itself is a sub object of the event object) and a pre-defined short text.

My python query script gets the results, I then loop over them and get the object with unrestrictedTraverse(x.getPath(), None).
I understood getObject is not really performant, but getting the objects with unrestrictedTraverse is not a lot faster.

What would be the best way to query for these objects and then display the results with the image?
Should I add the url of the image as meta data (title_image etc.)?

What is the best way to display search results? 
Is getting the whole object via unrestrictedTraverse() a good idea?
What are the alternatives?

Best,
Sebastian


More information about the Zope mailing list