[Zope-CMF] DCWorkflow Worklists are very expensive
John Morton
jwm@plain.co.nz
Fri, 4 Oct 2002 13:18:05 +1200
On Thu, 03 Oct 2002 23:32, Chris Withers wrote:
> John Morton wrote:
> > Every time a worklist action is rendered, it must do a catalog query to
> > find out if any there are any objects in that state, and how many. This,
> > as Shane has noted in the past, is kinda expensive :-)
>
> I'm guessing this is actually "Every time getFilteredActionsFor is called".
> One possibility is to only call getFilteredActionsFor once per rendered
> page.
>
> > Off the top of my head, I can think of a few potential solutions. One is
> > to tune up your catalog.
>
> What tuning would you invisige doing?
After a closer inspection of the available catalog tuning parameters, I have
to conclude that this was wishful thinking on my part :-)
> > Another is to change the worklists to just indicate
> > whether there are or are not any items in the worklist, using a catalog
> > query that stops on the first item found. I think this is theoretically
> > possible, but I don't know enough about the catalog to know for sure.
>
> ZCatalog can't do that.
Bummer :-(
> > Another solution is to create a new action catagory called something like
> > 'memberarea', which is only included if you are viewing pages under your
> > own personal memberarea, and have the worklist actions appear under that.
>
> I don't think this would help. You'd still be calculating the action each
> time, you just wouldn't eb using it unless the memberarea category was
> visible.
So getFilteredActionsFor would need to be hacked to only get actions for
categories we're interested in rendering?
John