Caching collection results

I have a composite page created with collective.cover and made of many collection tiles and I have a performance issue with it: as some of the collections return a bunch of results (a thousand, some times) the rendering of that particular object is taking a lot (up to 30 seconds).

My site has installed but, as long as I can see, collections are not selected on any of the various configuration screens.

How to I can tackle this problem? how do I configure caching of collection results in

Best regards

At first, have you already separated portal catalog into a separate mount point with optimized connection cache? (Cache should be big enough to keep the whole catalog in memory. This should be the first step in fixing catalog related performance issues.)

No, I haven't; I've been talking about moving the instances to bigger VM and now you gave me another argument.

On the other side, I think we probably must rewrite the collection tile to make some caching on it; it's not going to be easy because there are many variables involved.

Do you guys have a collection tile for Mosaic?

Yes, we have collection tile in Mosaic. It uses query builder from the new collections.

But I'm really not sure if caching collections make that much sense. The can only be cached by time, which is not optimal. Also catalog already has its own "Query Plan" to optimize queries after real usage patterns. Your issue most probably is that catalog objects are dropped from limited ZODB connection cache and reloading them there takes some time.

The real issue is that exporting catalog into a mount point from its own ZODB and connection cache is quite involved and we don't have official documentation nor products / recipes / scripts for it.

Have you profiled to see where the time is being spent? It could be in the catalog, but it could also be in diazo if there's a lot of markup. Do you really need to show so many items at once without using pagination?