This turned to be very easy; for a start, I installed the xdebug package with:
yum install php-pecl-xdebug
then I edited the configuration file
/etc/php.d/xdebug.ini
and added:xdebug.auto_trace = On
xdebug.show_mem_delta = On
Now I reloaded the page in the browser and got a shiny detailed report about memory consumption during the code execution in /tmp:
From that kind of report it is quite easy to spot big memory hoggers; in my case, I discovered about half of the peak memory usage (about 29Mb) is used for composing a single form control...
References:
Memory profiling doesn't work in the newer versions of Xdebug
ReplyDeleteRight now I am using 2.0.3 in Fedora 10 without problems.
ReplyDeleteThanks for the link, profiling worked. It seems my problems are with the PHP garbage collector being too inefficient.
ReplyDelete