<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>mFabrik - mobile sites, apps, HTML5 and CMS software development &#187; zodb</title>
	<atom:link href="http://blog.mfabrik.com/tag/zodb/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mfabrik.com</link>
	<description>Freedom delivered.</description>
	<lastBuildDate>Wed, 03 Aug 2011 09:47:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>scp file copy with on-line compression</title>
		<link>http://blog.mfabrik.com/2011/03/02/scp-file-copy-with-on-line-compression/</link>
		<comments>http://blog.mfabrik.com/2011/03/02/scp-file-copy-with-on-line-compression/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 20:12:22 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[plone]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[data.fs]]></category>
		<category><![CDATA[level]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[scp]]></category>
		<category><![CDATA[sftp]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[zodb]]></category>

		<guid isPermaLink="false">http://blog.mfabrik.com/?p=1048</guid>
		<description><![CDATA[This might come handy if you need to copy a database file (Data.fs) from the remote server to your local computer: scp -C -o CompressionLevel=9 user@yoursite.com:~/plonefolder/zinstance/var/filestorage/Data.fs . This command line enables real-time compression with the highest compression level. This speeds up copying somewhat, as ZODB database compresses pretty well. Get developers  Subscribe mFabrik blog in [...]]]></description>
			<content:encoded><![CDATA[<p>This might come handy if you need to copy a database file (Data.fs) from the remote server to your local computer:</p>
<pre>scp -C -o CompressionLevel=9 user@yoursite.com:~/plonefolder/zinstance/var/filestorage/Data.fs .</pre>
<p>This command line enables real-time compression with the highest compression level. This speeds up copying somewhat, as ZODB database compresses pretty well.
<p class="signature">
<a href="http://mfabrik.com/@@zoho-contact-form"><img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/mfabrik-24.png"></a> <a href="http://mfabrik.com/@@zoho-contact-form">Get developers</a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml"><img valign="middle" src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png" alt="" style="vertical-align:middle;border:0"/></a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml">Subscribe mFabrik blog in a reader</a> <a href="http://twitter.com/mfabrik"> <img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/twitter-24.png"></a> <a href="http://twitter.com/moo9000">Follow me on Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2011/03/02/scp-file-copy-with-on-line-compression/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Importing Apache log file with performance information into OpenOffice / Excel using Python script</title>
		<link>http://blog.mfabrik.com/2011/01/24/importing-apache-log-file-with-performance-information-into-openoffice-excel-using-python-script/</link>
		<comments>http://blog.mfabrik.com/2011/01/24/importing-apache-log-file-with-performance-information-into-openoffice-excel-using-python-script/#comments</comments>
		<pubDate>Mon, 24 Jan 2011 16:47:42 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[plone]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[analyse]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[microsoft excel]]></category>
		<category><![CDATA[openoffice.org calc]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[pyexcelerator]]></category>
		<category><![CDATA[shlex]]></category>
		<category><![CDATA[zodb]]></category>

		<guid isPermaLink="false">http://blog.mfabrik.com/?p=907</guid>
		<description><![CDATA[You can enhance Apache log files to include performance information, like read/sent bytes and HTTP request processing time. Compared to load tool (JMeter) generated data this information is usually easier to acquire and reflects the actual production server usage patterns. I think there even exist tools to replay the log data to rerun the load [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.mfabrik.com/2010/12/21/enhanced-apache-logging-request-duration-balancer-member-transferred-bytes/">You can enhance Apache log files to include performance information, like read/sent bytes and HTTP request processing time</a>. Compared to load tool (JMeter) generated data this information is usually easier to acquire and reflects the actual production server usage patterns. I think there even exist tools to replay the log data to rerun the load in simulation mode. This, however, works only on systems whose state can be reseted to the original situation (<a href="http://www.zodb.org/">like with ZODB transactional database</a>).</p>
<p>Below is an example Python script snippet which reads this custom Apache log file and creates Excel export out of it. After this, you can easily open this file in OpenOffice Calc or Microsoft Excel and draw nice diagrames out of it to see where the performance bottlenecks are.</p>
<p>The script splits duration column for the output file. You can easily add your own splits or use Calc&#8217;s Text to Columns editor.</p>
<p>The script:</p>
<pre>#!/bin/python

import shlex
from pyExcelerator.Workbook import Workbook

FILE = "/var/log/apache2/yourlogfile.log"

def get_parts(line):
	""" Extract the parts of a line"""

	parts = shlex.split(line) # Split reserving parts inside quotation marks
	# 'duration:0/42327', 'io:643/4507', 'balancer:http://127.0.0.1:13003/']

	return parts

def get_duration(duration):
	""" Extract duration in ms from log line """

	keyword, args = duration.split(":")
	seconds, microseconds = args.split("/")

	mseconds = int(microseconds) 

	return mseconds

wb = Workbook()
sheet = wb.add_sheet('0')

print "Reading log"
i = 0

for line in open(FILE, "rt"):
	parts = get_parts(line)
	j = 0

	for part in parts:
		sheet.write(i,j,part)
		j += 1
         	sheet.write(i,len(parts)+1,get_duration(parts[-3]))
	i += 1

wb.save('output.xls')</pre>
<p class="signature">
<a href="http://mfabrik.com/@@zoho-contact-form"><img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/mfabrik-24.png"></a> <a href="http://mfabrik.com/@@zoho-contact-form">Get developers</a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml"><img valign="middle" src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png" alt="" style="vertical-align:middle;border:0"/></a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml">Subscribe mFabrik blog in a reader</a> <a href="http://twitter.com/mfabrik"> <img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/twitter-24.png"></a> <a href="http://twitter.com/moo9000">Follow me on Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2011/01/24/importing-apache-log-file-with-performance-information-into-openoffice-excel-using-python-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Running 32-bit chroot on 64-bit Ubuntu server to reduce Python memory usage</title>
		<link>http://blog.mfabrik.com/2010/08/03/running-32-bit-chroot-on-64-bit-ubuntu-server-to-reduce-python-memory-usage/</link>
		<comments>http://blog.mfabrik.com/2010/08/03/running-32-bit-chroot-on-64-bit-ubuntu-server-to-reduce-python-memory-usage/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 16:15:02 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[plone]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[zope]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[chroot]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[debootstrap]]></category>
		<category><![CDATA[memory usage]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[restart]]></category>
		<category><![CDATA[zodb]]></category>

		<guid isPermaLink="false">http://blog.mfabrik.com/?p=606</guid>
		<description><![CDATA[Here are documented brief instructions how to run 32-bit chroot&#8217;ed environment on 64-bit Ubuntu server. chroot means that you run re-rooted and jailed system inside another system. What we do here is enabling 32-bit chroot&#8217;ed userland on 64-bit server. 32-bit userland and 32-bit Python environment reduces the memory usage of heavy website applications we are [...]]]></description>
			<content:encoded><![CDATA[<p>Here are documented brief instructions how to run 32-bit chroot&#8217;ed environment on 64-bit Ubuntu server. chroot means that you run re-rooted and jailed system inside another system.</p>
<p>What we do here is enabling 32-bit chroot&#8217;ed userland on 64-bit server. 32-bit userland and 32-bit Python environment reduces the memory usage of heavy website applications we are running (read: Plone/Zope), since 32-bit has only half of the pointer size and object-oriented programming is all about pointers. Zope is especially memory hungry, because it uses ZODB object database. The developer does not need to worry about when doing queries, updates or caches that much  as the persistent site state is transparent to Python (objects are automatically loaded from database or cache when they are referred). Easy persistency means that almost everything is in the database and you need to have big object cache. Plone has huge client-side, in-process, cache for persistent objects. The default setting is for the cache size 5000 objects. (sidenote: since ZODB cache is in-process and Python does not do threading too well, running big Plone sites means that you need run several processes to handle parallel requests &#8211; having multiple processes with big in-process caches means loads of memory consumption)</p>
<p>32-bit userland is especially useful if you need to run Plone on 64-bit VPS (virtual private server) with low amount of available memory (512 MB or 1 GB).</p>
<p>There are some brief measurements about 32-bit vs. 6-bit Python memory usage at the end of this article.</p>
<p>Unless otherwise specified, all command here should be run as the root user of the host system. Commands here are for example only and you <strong>need to know what you are doing</strong>. If you lack advanced UNIX administration skills we <a href="http://mfabrik.com/@@zoho-contact-form">gladly arrange you some commercial training or hosting support</a>.</p>
<h2>Installing</h2>
<p>Basic schroot installation instructions for Ubuntu can be found here <a title="https://help.ubuntu.com/community/DebootstrapChroot" href="https://help.ubuntu.com/community/DebootstrapChroot">https://help.ubuntu.com/community/DebootstrapChroot</a> . We also install ZopeSkel in the chroo&#8217;ed environment for starting creating Plone sites. Note that we are using Ubuntu 8.04 which still ships with Python 2.4 &#8211; <a href="http://blog.mfabrik.com/2010/07/16/easily-install-all-python-versions-under-linux-and-osx-using-collective-buildout-python/">for later Ubuntus you need to compile Python 2.4 from the scratch</a>.</p>
<pre>apt-get install debootstrap
apt-get install schroot

# Old schroot uses global schroot.conf, new versions have
# chroot.d directory

# This is a heredoc, but use what ever editor you like
# to create the configuration
cat &lt;&lt;EOF &gt; /etc/schroot/chroot.d/hardy_i386.conf
[hardy_i386]
description=Ubuntu 8.04 Hardy for i386
location=/srv/chroot/hardy_i386
personality=linux32
root-users=bob
run-setup-scripts=true
run-exec-scripts=true
type=directory
users=bob,john,alice,ploneuser
EOF

mkdir -p /srv/chroot/hardy_i386
debootstrap --variant=buildd --arch i386 hardy /srv/chroot/hardy_i386 \

http://archive.ubuntu.com/ubuntu/

# Check that the chroot is created and working
schroot -l

# Enter the chroot (logged in as bob)
schroot -c hardy_i386 -u root

# Once inside, install python2.4-dev and other needed tools
# Installing PIL with easy_install didn't work for some
# reason, so we use python-imaging package.
apt-get install python2.4-dev python-setuptools python-imaging
easy_install-2.4 ZopeSkel</pre>
<p>And that&#8217;s about it.</p>
<p>Chroot&#8217;ed environment will have</p>
<ul>
<li>It&#8217;s own application binaries (and userland bitness)</li>
</ul>
<p>Chroot&#8217;ed environment will share with the host system</p>
<ul>
<li>Ports</li>
<li>Processes</li>
<li>User accounts</li>
</ul>
<p>Chroot&#8217;ed users</p>
<ul>
<li>Can&#8217;t list filesystem outside chroot</li>
</ul>
<p>&#8230;giving additional safety for shared hosting in the case of chroot&#8217;ed environment is compromised.</p>
<h2>Entering chroot&#8217;ed environment as a specific user</h2>
<p>Try</p>
<pre>schroot -c hardy_i386 -u root</pre>
<p>&#8230;or&#8230;</p>
<pre>schroot -c hardy_i386 -u plone_user # After you have set-uped normal user for chroot'ed environment</pre>
<p><strong>All background processes you leave running in chroot&#8217;ed environment are terminated when you exit this environment</strong>, unless you create sessions as described below.</p>
<h2>Creating chroot sessions</h2>
<p>Sessions enable running commands in chroot without the need to have it constantly open.</p>
<pre># Create a new schroot session
schroot --chroot=hardy_i386 --user=ploneuser \
--session-name=plonesession \
--begin-session

# Run commands in the created session
schroot --chroot=plonesession --user=ploneuser --run-session \
/srv/plone/yourplonesite/bin/instance start

# Ending session
schroot --chroot=plonesession --user=ploneuser --end-session</pre>
<p>Note that -<em>-chroot</em> parameter takes in both actual chroot installations and session ids.</p>
<h2>Doing resets for chrooted environment</h2>
<p>The session processes exist as long as the session exist. Unless you explicitly start a new session with &#8211;begin-session the processes are terminated as soon as you log out from the chroot&#8217;ed environent.<br />
<strong>chroot&#8217;ed environment is temporary unless you explicitly specify it not be</strong><br />
Thus if you want to run daemonized services in chrooted environment you need to take care of session handling manually.<br />
Here is an example how do you construct a session (as a real root user) and then launch a shell script which will take care of launching applications inside the chroot.</p>
<pre># Terminate previous session if any
schroot --chroot=hardy_i386 --user=plone_user --session-name=plone_session --end-session</pre>
<pre>#Start the session (again)
schroot --chroot=hardy_i386 --user=plone_user --session-name=plone_session --begin-session</pre>
<pre># Run a start script inside the chroot'ed environment which will start Plone
# NGINX and other necessary 32-bit services
schroot --chroot=plone_session --user=plone_user --run-session /srv/plone/myplonesite/restart-all.sh</pre>
<h2>Running sessions at startup</h2>
<p>You can add schroot bootstrap in real /etc/rc.local:</p>
<pre>schroot --chroot=hardy_i386 --user=ploneuser \
--session-name=plonesession --begin-session \
&amp;&amp; schroot --chroot=plonesession --run-session \
/srv/plone/inst/bin/instance start</pre>
<p>Remember that the users have to be created outside the chrooted environment. If you set the home directory to something that exists only in the chrooted environment, use something like this</p>
<pre>adduser --no-create-home --home HOMEDIR_IN_CHROOT ploneuser</pre>
<p>Then to create the directory inside the chroot and set its ownership to the newly created user and group.</p>
<h2><strong>32-bit vs 64-bit memory consumption</strong></h2>
<p><strong></strong>Reason why we even tried this is that some python applications, like Zope, use references heavily and moving from 32bit to 64bit references increases memory usage. (<a title="J Stahl 2010" href="http://jstahl.org/archives/2010/01/24/plone-4-uses-29-less-memory-than-plone-3-thanks-python-2-6/">J Stahl 2010</a>)</p>
<p>Memory figures from a development Zope/Plone 3.3.5 server</p>
<table border="1" cellspacing="0" cellpadding="3" bordercolor="#000000">
<tbody>
<tr>
<td width="33.333333333333336%"></td>
<td width="33.333333333333336%" align="left">32-bit</td>
<td width="33.333333333333336%">64-bit</td>
</tr>
<tr>
<td width="33.333333333333336%">After startup</td>
<td width="33.333333333333336%">112 MiB RES<br />
116 MiB VIRT</td>
<td width="33.333333333333336%">175 MiB RES<br />
342 MiB VIRT</td>
</tr>
<tr>
<td width="33.333333333333336%">After normal usage</td>
<td width="33.333333333333336%">159 MiB RES<br />
194 MiB VIRT</td>
<td width="33.333333333333336%">236 MiB RES<br />
487 MiB VIRT</td>
</tr>
</tbody>
</table>
<p>This is far from a complete study, but it would seem that the chroot does pay off even though it has to load 32bit versions of basic libraries along. If running more than one instance on same server memory savings should increase.</p>
<h2>More information</h2>
<ul>
<li><a href="http://manpages.ubuntu.com/manpages/hardy/man1/schroot.1.html">http://manpages.ubuntu.com/manpages/hardy/man1/schroot.1.html</a></li>
<li><a href="http://en.wikipedia.org/wiki/Chroot">http://en.wikipedia.org/wiki/Chroot</a></li>
</ul>
<p class="signature">
<a href="http://mfabrik.com/@@zoho-contact-form"><img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/mfabrik-24.png"></a> <a href="http://mfabrik.com/@@zoho-contact-form">Get developers</a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml"><img valign="middle" src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png" alt="" style="vertical-align:middle;border:0"/></a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml">Subscribe mFabrik blog in a reader</a> <a href="http://twitter.com/mfabrik"> <img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/twitter-24.png"></a> <a href="http://twitter.com/moo9000">Follow me on Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2010/08/03/running-32-bit-chroot-on-64-bit-ubuntu-server-to-reduce-python-memory-usage/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Packing and copying Data.fs from production server for local development</title>
		<link>http://blog.mfabrik.com/2009/09/01/packing-and-copying-data-fs-from-production-server-for-local-development/</link>
		<comments>http://blog.mfabrik.com/2009/09/01/packing-and-copying-data-fs-from-production-server-for-local-development/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 11:30:56 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[plone]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[offline]]></category>
		<category><![CDATA[packing]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[scp]]></category>
		<category><![CDATA[synchronize]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[virtualenv]]></category>
		<category><![CDATA[zodb]]></category>

		<guid isPermaLink="false">http://blog.twinapex.fi/?p=267</guid>
		<description><![CDATA[These instructions help you to copy and transfer production server  ZODB database (Data.fs) to your local computer for development and testing. This allows you to do the testing against the copy of real data and the production server Plone instance set up. See the original tip by cguardia. Data.fs is ZODB file storage for transactional [...]]]></description>
			<content:encoded><![CDATA[<p>These instructions help you to copy and transfer production server  ZODB database (Data.fs) to your local computer for development and testing. This allows you to do the testing against the copy of real data and the production server Plone instance set up.</p>
<p><a href="http://blog.delaguardia.com.mx/packing-the-zodb-offline">See the original tip by cguardia</a>.</p>
<p>Data.fs is ZODB file storage for transactional database. Journal history takes quite a lot of disk space there. Packing, i.e. removing the journal history,  usually reduces the size file considerably, making the file lighter for wire transfer. Depending on the database age the packed copy is less than 10% of the original size.</p>
<p>These instructions apply for Ubuntu/Debian based Linux systems. Apply to your own system using the operating system best practices.</p>
<p>We need ZODB Python package to work with the database. To use it, we&#8217;ll create virtualenv Python installation in /tmp. In virtualenv installation, installed Python packages do not pollute or break the system wide setup. Note that you might use easy-install-2.4 depending on the OS. <a href="http://pypi.python.org/pypi/ZODB3">The latest stable ZODB can be picked from PyPi listing</a>. Plone 3.x default is ZODB 3.7.x, which is not available as Python egg, but you can use ZODB 3.8.x.</p>
<pre>
<pre>sudo easy-install virtualenv</pre>
<p>cd /tmp</p>
<p>virtualenv packer</p>
<p>/tmp/packer/bin/easy_install ZODB=3.8.3</pre>
<p>Data.fs cannot be modified in-place. You must create a copy of it to work with it. Data.fs copy can be created from a running system without the fear of corrupting the database, since ZODB is append only database.</p>
<pre>cp /yoursite/var/filestorage/Data.fs /tmp/Data.fs.copy</pre>
<p>Then create the following script snippet <em>/tmp/pack.py</em> using your favorite terminal editor.</p>
<pre>import time
import ZODB.FileStorage
import ZODB.serialize

storage=ZODB.FileStorage.FileStorage('/tmp/Data.fs.copy')
storage.pack(time.time(),ZODB.serialize.referencesf)</pre>
<p>And run it using virtualenv&#8217;ed Python setup with ZODB installed:</p>
<pre>/tmp/packer/bin/python /tmp/pack.py</pre>
<p>Lots of patience here&#8230; packing may take a while, but it&#8217;s still definitely faster than your Internet connection transfer rate.</p>
<p>Verify that the file is succesfully packed:</p>
<pre>ls -lh Data.fs.copy
-rw-r--r-- 1 user user 30M 2009-09-01 13:24 Data.fs.copy</pre>
<p>Woohoo 1 GB was shrunk to 30 MB. Then copy the file to your local computer using scp and place it to your development buildout.</p>
<pre>scp user@server:/tmp/Data.fs.copy ~/mybuildout/var/filestorage/Data.fs</pre>
<p>You just saved about 30-90 minutes of waiting of file transfer.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2009/09/01/packing-and-copying-data-fs-from-production-server-for-local-development/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Speeding up Plone loading with PTS_LANGUAGES</title>
		<link>http://blog.mfabrik.com/2008/08/19/speeding-up-plone-loading-with-pts_languages/</link>
		<comments>http://blog.mfabrik.com/2008/08/19/speeding-up-plone-loading-with-pts_languages/#comments</comments>
		<pubDate>Mon, 18 Aug 2008 21:04:25 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[placelesstranslationservice]]></category>
		<category><![CDATA[Plone (old)]]></category>
		<category><![CDATA[PTS_LANGUAGES]]></category>
		<category><![CDATA[speed up]]></category>
		<category><![CDATA[zodb]]></category>

		<guid isPermaLink="false">http://blog.redinnovation.com/?p=60</guid>
		<description><![CDATA[If you are not a Finnish speaker (like 99,9% of you) you might not want to (re)load Finnish and other unwanted language catalogs during the Plone start up. This is possible for Plone 3.1, as Reinout van Rees explains (found out afterwards). For your Plone launcher, set environment variables (space separated list) PTS_LANGUAGES=en mylanguagecodehere If [...]]]></description>
			<content:encoded><![CDATA[<p>If you are not a Finnish speaker (like 99,9% of you) you might not want to (re)load Finnish and other unwanted language catalogs during the Plone start up. <a href="http://vanrees.org/weblog/load-only-the-languages-you-need-with-pts">This is possible for Plone 3.1, as Reinout van Rees explains (found out afterwards)</a>.</p>
<p>For your Plone launcher, set environment variables (space separated list)</p>
<p>PTS_LANGUAGES=en mylanguagecodehere</p>
<p>If your Data.fs is not fresh (i.e. you have an existing Plone instance) there is still one task to do. Go to Placess Translation Service in Zope. Delete all translation catalogs. If there exists a translation catalog entry in ZODB a reload event seem to be triggered even though PTS_LANGUAGES settings is effective. Restart Zope. Maybe this is a bug? Do this on a development box only &#8211; this code seems to be quite new.<br />
The magic code is in PlacelessTranslationService/load.py.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2008/08/19/speeding-up-plone-loading-with-pts_languages/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

