[Zope] cpu load 99 percent a lot in plone evinironment

Philip Kilner phil at xfr.co.uk
Tue Feb 13 05:31:46 EST 2007


Hi Robert (Jamie?),

Robert (Jamie) Munro wrote:
> I've been having similar speed problems with a page that loops through a
> lot of SQL records. From what I can tell from the profiler, it is the
> security machinery that is at fault.
> 

I'm doing the same sort of stuff, and routinely have the same sorts of
problems.

Two other things that I've done that help are: -

- Use the database to handle pagination, such that a single page of data
is returned - Plone/Zope batching can be very slow with huge data sets
(which to be fair it was never designed for). This is easy with
PostgreSQL and there is a work around for SQL Server.

- Instead of simply embedding my dataset (sometimes multiple datasets)
in the page, use AHAH to pull in a panel of data into the existing page
as a pure Zope transaction. This makes the UI a lot more fluid by
avoiding multiple redundant Plone page loads (e.g. during pagination, or
when doing drill-down type navigation).

AHAH does not seem to be much discussed here - it's worth reading: -

	http://microformats.org/wiki/rest/ahah
&
	http://www.gizax.it/ahahsection/

	(I have based my work on the script in the second link)

Short version: uses AJAX-like technique of rewriting the HTML using
JavaScript, but returns pure HTML as opposed to XML or JSON, so trivial
to implement, and can degrade gracefully.

HTH


-- 

Regards,

PhilK

'let's hear it for the vague blur'


More information about the Zope mailing list