On 12/13/05 7:18 AM, Dries Buytaert wrote:
Hi Christophe,
On 13 Dec 2005, at 12:13, Christophe Chisogne wrote:
I had a strange problem while importing a new po file in drupal 4.6.4/5. Finally, I found the solution [3] : memory_limit should be higher than 8Mb.
instead of increasing the memory limit, I'd like to see us investigate how we can reduce the memory requirements of the locale module's parser.
while I'm all for optimizations... and Drupal's RAM usage could definitely use some optimizations, the fact is RAM is fairly cheap, and PHP's default 8M is a bit dated. Most larger scale projects these days recommend 16M (in fact I heard rumours that the PHP team is considering up'ing the default).
I haven't looked at the code, but using explicit unset()s might be enough to reduce memory usage. Unsetting a variable will free its memory! Not sure memory is freed when a variable is overwritten or when a local variable goes out of scope when method execution returns to its caller. It is certainly worth exploring ...
I *believe* that only unset will free the memory (until the end of execution). i may well be wrong - so yeah, investigation is in order :) -- James Walker :: http://walkah.net/ :: xmpp:walkah@walkah.net