Warning

This document hasn't been checked for compatibility with current versions of Plone. Use at your own risk.

Write your application with performance in mind

by Ivo van der Wijk last modified Dec 06, 2009 09:27 PM
How to make sure your application is as fast as possible, some general tips and hints.

When writing Zope/Plone applications, keep in mind that:

  • Zope (and especially ZEO) are optimized for many reads/few writes. Performing a write on your ZODB with every request (i.e. a page counter) will break performance beyond repair. Use filesystem access, an external RDBMS (though this might not be too efficient either) or an alternative ZODB storage.
  • object lookups are expensive. Use the catalog as much as possible, and attempt to get all required data from your catalogbrain. This may meen that you need to add additional fields to your catalog.
  • Filesystem code is more efficient than pythonscripts - pythonscripts require alot of security checks. If possible, move your scripts to filesystem code (External Methods are an improvement as well)
  • Avoid using the custom folder - it cannot be cached like Filesystem directoryviews can. Actually, avoid doing development/testing work on your production server at all.
  • Keep performance in mind with your (interaction)design. Make sure people can get to the right information in as few clicks as possible. Try to make the most frequently requested pages (i.e. front page) as efficient as possible. Offer optimized search pages before sending people to a heavy advanced search page.
  • Keep in mind, when creating templates, how well pages can be cached by the user's browser or by a caching proxy.
  • Standard plone templates are very multi-purpose. Consider optimizing the plone templates (removing whatever functionality and security checks you don't need). You can also consider creating a completely standalone visitor skin without any of the plone management functionality.
Filed under:

Contribute

Something wrong or out of date? Anybody can edit or create a new article in the knowledge base. Simply create an account on this site, log in, and click the Edit button to contribute.