[Zope] Faster ZCatalog Searches (better? Optimized?)

BZ bz@bwanazulia.com
Mon, 29 Apr 2002 07:09:19 -0400


Hey Toby,

I played around with this way too much last friday and the 
performance hit, from what I can tell, is having the dtml do the 
reverse. I looked at code from Zope.org and they do it this way:

<dtml-with "_(results = searchResults(in_reply_to=[''], REQUEST=REQUEST))">

If I take out any of the sorting, I can get 10x the speed, but at 
that point, what is the point?

BZ


At 10:45 AM +0100 4/29/02, Toby Dickenson wrote:
>On Fri, 26 Apr 2002 14:26:39 -0400, BZ <bz@bwanazulia.com> wrote:
>
>>ZUBB:
>><dtml-in "searchResults(in_reply_to=[''])" size=batch_size reverse
>>sort=id start=query_start>
>
>You are are getting dtml-in to do the sorting, not the catalog. The
>difference may be very small, or very large
>
>Try this (untested) code as a perfomance test
>
><dtml-in "searchResults(in_reply_to=[''],sort_on='id')"
>size=batch_size
>start=query_start>
>
>That should be faster, but reverses the sort order. In not sure if
>putting the 'reverse' dtml-in tag back in will incur a performance
>penalty.
>
>
>I have recently committed some significant micro-optimisations to the
>the catalog for sorted queries, which have improved the runtime for
>some of my queries by a factor of 8. If you want these, they are
>currently in the CVS trunk and will definitely go into 2.6.
>
>
>
>Toby Dickenson
>tdickenson@geminidataloggers.com