Ah, ok, I was not aware of the behaviour of gettext as an extension for php
running as an apache mod in an environment where php is only serving a single
dedicated site. I can't imagine you'd possibly ever want php / apache to load
in all mo files for every one of maybe 1000 sites that are hosted on a cluster
(and all of which might use gettext) every time a new apache worker was started
- esp. as mod_php actually gets init'd even when apache only serves a static
On 12 Apr 2010, at 14:27, Florent wrote:
> Robert Goldsmith <rgoldsm...@...> writes:
>> I'm not sure why you would assume the gettext translation would already be
>> in memory - the mo file will need to be read in for each page impression
>> unless you have a shared memory system such as memcache or apc. This
>> means an extra hit on the disk and time to process the mo file
>> (for each mo file).
> Well, if you use gettext as a PHP extension, mo files are loaded in
> memory when apache starts. There's no extra hit on the file system then.
> Even if its pretty fast, you still have the overhead of calling a function
> to translate the string, which could be avoided because translated strings
> are not supposed to be changed on a request basis.
> PHPTAL mailing list
PHPTAL mailing list