Attention

This document was written for an old version of Plone, Plone 3, and was last updated 898 days ago.

To learn how to upgrade to the current version of Plone, read the upgrade manual.

How to speed up Plone startup by disabling unused languages

by Jon Stahl last modified Dec 06, 2009 09:27 PM
You can speed up Plone's startup time and reduce RAM usage (slightly) by disabling languages you aren't using with a one-line change to your buildout. Here's how.

Reinout Van Rees writes on his blog:

Plone is translated into a whopping amount of languages. Many add-on products also sport at least a few translations. This is all handled by zope's PlacelessTranslationService (PTS).

When starting up, all those translation files are loaded and information about them is stored in the zodb. That takes time and memory. A recent PTS release (at least included in Plone 3.1.1) added a nifty trick to reduce that footprint in case you don't need those languages: a PTS_LANGUAGES=en,nl environment variable would make PTS use on the Dutch and English.

In case you use buildout, add the following to your instance part:

 [instance]
 recipe = plone.recipe.zope2instance
 ...
 environment-vars =
     PTS_LANGUAGES en, nl

Note that it seemed to want a comma AND a space when I tested it locally, might be a bug.


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.