I've pulled my hair over this one and even tried debugging memory usage in the potx code to no avail.
It seemed that each call to _potx_process_file() added ~10 MB memory usage.
Then each iteration
foreach ($strings as $string => $string_info) {
in _potx_build_files() also added ~10-20 MB.
Running the potx-cli.php was no problem (and was quick) but then I didn't get the translations I already had done so I couldn't use that.
Solution to all my problems: Disable the Devel module!
After disabling Devel the extraction works quick and flawless.
I haven't looked into what the Devel module (in conjunction with potx) does to leak the memory but Allowed memory size of 268435456 bytes exhausted
seems to imply that there are some heavy leaking going on...
Comments
Comment #1
jramby commentedMaybe you are running the code from out of the module's directory.
Comment #2
Anders Kallin commentedI've pulled my hair over this one and even tried debugging memory usage in the potx code to no avail.
It seemed that each call to
_potx_process_file()added ~10 MB memory usage.Then each iteration
in
_potx_build_files()also added ~10-20 MB.Running the potx-cli.php was no problem (and was quick) but then I didn't get the translations I already had done so I couldn't use that.
Solution to all my problems: Disable the Devel module!
After disabling Devel the extraction works quick and flawless.
I haven't looked into what the Devel module (in conjunction with potx) does to leak the memory but
Allowed memory size of 268435456 bytes exhaustedseems to imply that there are some heavy leaking going on...
Comment #3
gábor hojtsyDevel module just collects lots of additional information to display for debugging, etc.