[Zope] Strange problem about Catalog

Small Business Services toolkit at magma.ca
Mon Feb 16 15:12:38 EST 2004


From: "Star War" <starwar992001 at yahoo.com>
> After recataloging the whole web site, I found a very
> strange problem: it takes about 10 seconds to access a
> page that may be dynamically generated by DTML methods
> using catalog. But it is very fast if you just access
> a static page in the same site by giving url directly.
> So I guess it is caused by catalog.


Some things that can slow zcatalog down:

1) the first retrieval - indexes are loaded into memory the first time
zcatalog is searched.  You should see faster retrievals on subsequent
searches

2) amount of RAM available vs index size (large index + small RAM =
swapping)

3) cache size setting: the default is quite small (Control Panel - Database
Management - Cache Parameters, we use a setting of 10000, but it is RAM
dependant)

4) number of objects in a single folder.  If you have thousands of objects
in a single folder the default zope folder can cause you grief (have a look
at the BTreeFolder product for a possible replacement)

Another option is to install the CallProfiler product and see where the time
is being spent.

Also, the fast retrieval of static pages could be the result of the page
being served from the cache as opposed to being served from zope.  A quick &
dirty way to test the zope 'serve' of the static page is to manually enter
<url>?xxx=abc - this should cause your web server to request the page from
zope instead of getting it from the cache (and the page will ignore the
parameters), so you can see if there is a difference.


HTH

Jonathan







More information about the Zope mailing list