[Zope-CMF] Efficient way to get replyCount
Andy McKay
andym@ActiveState.com
Tue, 25 Sep 2001 08:54:01 -0700
> You could add 'replyCount' to the metadata schema of your catalog,
> and then it would be computed only at indexing time -- you would
> want your DiscussionItem skins to cause the source object to be
> recatalogued whenever a reply was added, though.
Hmm I thought about that too... it will be faster in read time, but will
dramatically increase the amount of cataloging.
> BTW, I really like the way ZopeZen looks and works atop the CMF!
Thanks, and thanks for a great framework in the first place.
--
Andy McKay.
----- Original Message -----
From: "Tres Seaver" <tseaver@palladion.com>
To: "Zopista" <zopista@zopezen.org>
Cc: <zope-cmf@zope.org>
Sent: Tuesday, September 25, 2001 6:00 AM
Subject: Re: [Zope-CMF] Efficient way to get replyCount
> On Tue, 25 Sep 2001, Zopista wrote:
>
> > On the home page of ZopeZen I have a list of articles and want to
display
> > the reply count for each article. Its there now, but I did it in a
hideous
> > way, I go and get each message (using restrictedTraverse) and then call
> > replyCount on talkback of each object. It works but its hideously
expensive.
> > Since replyCount isnt exposed anywhere else, I just can see an obvious
way
> > of doing this quickly, is there one?
>
> You could add 'replyCount' to the metadata schema of your catalog,
> and then it would be computed only at indexing time -- you would
> want your DiscussionItem skins to cause the source object to be
> recatalogued whenever a reply was added, though.
>
> BTW, I really like the way ZopeZen looks and works atop the CMF!
>
> Tres.
> --
> ===============================================================
> Tres Seaver tseaver@zope.com
> Zope Corporation "Zope Dealers" http://www.zope.com
>
>
> _______________________________________________
> Zope-CMF maillist - Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
>
> See http://www.zope.org/Products/PTK/Tracker for bug reports and feature
requests
>