[Zope-CMF] Fieldindex searches very slow when anonymous.

Tres Seaver tseaver@zope.com
Tue, 09 Apr 2002 07:21:21 -0400

Arnar Lundesgaard wrote:
> THANK YOU!!!!!!!!!!!!
> This worked extremely well, and the site is
> almost faster than the squid cache now. :-)
> http://www.forskning.no is a major ZOPE site
> (for us), that will be released tomorrow noon
> local time. This is the first site that uses
> our soon to be opensourced TopicMap engine that
> builds on CMF. The engine lets CMF handle all 
> Topic Map data items, giving us access to CMF
> functionality like versioning and workflow.
> It should be opensourced when we have time to
> clean it up a bit and document it.

Excellent -- I'm glad that helped.  Note that for Zope 2.6, we have
added some new index types to deal more directly with such problems:

   - DateIndex:  a FieldIndex which knows it is for DateTimes,
     and indexes a much more efficient (both space and time!)

   - DateRangeIndex:  indexes a pair of DateTimes, allowing the specific
     query you had trouble with to go *much* faster;

   - TopicIndex:  indexes values which pass user-defined filters, effectively
     "precomputing" a frequently-used catalog query.


>>-----Original Message-----
>>From: Tres Seaver [mailto:tseaver@zope.com]
>>Sent: 9. april 2002 05:43
>>To: Arnar Lundesgaard
>>Cc: zope-dev@zope.org
>>Subject: Re: [Zope-CMF] Fieldindex searches very slow when anonymous.
>>What is killing your query is the test for "effective range" 
>>of content.  If
>>your site does not use the concept (i.e., all your content 
>>has 'None' for
>>both its effective and expires dates), you can apply the 
>>following patch to
>>remove the check::
>>-------------- patch starts here ---------------------------------
>>--- CMFCore/CatalogTool.py	4 Jan 2002 19:50:04 -0000	1.22
>>+++ CMFCore/CatalogTool.py	9 Apr 2002 03:42:14 -0000
>>@@ -186,7 +186,7 @@
>>          user = _getAuthenticatedUser(self)
>>          kw[ 'allowedRolesAndUsers' ] = 
>>self._listAllowedRolesAndUsers( user )
>>-        if not _checkPermission(
>>+        if 0 and not _checkPermission(
>>              CMFCorePermissions.AccessInactivePortalContent, self ):
>>              base = aq_base( self )
>>              now = DateTime()
>>-------------- patch ends here -----------------------------------

Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com