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

2002-04-09 Thread Tres Seaver

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!)
 representation;

   - 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.

Tres.

>>-Original Message-
>>From: Tres Seaver [mailto:[EMAIL PROTECTED]]
>>Sent: 9. april 2002 05:43
>>To: Arnar Lundesgaard
>>Cc: [EMAIL PROTECTED]
>>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.py4 Jan 2002 19:50:04 -   1.22
>>+++ CMFCore/CatalogTool.py9 Apr 2002 03:42:14 -
>>@@ -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.
-- 
===
Tres Seaver[EMAIL PROTECTED]
Zope Corporation  "Zope Dealers"   http://www.zope.com



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



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

2002-04-09 Thread Arnar Lundesgaard

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.


 -  Arnar Lundesgaard



> -Original Message-
> From: Tres Seaver [mailto:[EMAIL PROTECTED]]
> Sent: 9. april 2002 05:43
> To: Arnar Lundesgaard
> Cc: [EMAIL PROTECTED]
> 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.py4 Jan 2002 19:50:04 -   1.22
> +++ CMFCore/CatalogTool.py9 Apr 2002 03:42:14 -
> @@ -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.
> -- 
> ===
> Tres Seaver[EMAIL PROTECTED]
> Zope Corporation  "Zope Dealers"   http://www.zope.com
> 
> 


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )