Re: free allocated memory: HOW ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Arthur Erdös wrote:
Am Freitag, den 13.04.2007, 16:03 +1000 schrieb Chris:
ok, the complete workflow is a little bit complicated. we are using a
workflow engine and the newsletter generator is one step of three. the
first cleans the statistics data, the second generates the new data and
the third is the one which generates the mails.
Put this in between each line and see where your memory is jumping the most:

error_log('in file ' . __FILE__ . ' at line ' . __LINE__ . '; memory usage is ' . number_format((memory_get_usage() / 1024), 4) . ' kb');

Once you've worked out the biggest jumps, fix them, then work on the next one and so on.


It's going to be a lot quicker doing something like that over asking us to help you work out thousands of lines of code.


sure, i just posted the code because i was asked to ;)

i figured out the biggest jump (after reading the template) but could
not fix it yet -.-

Reading in the template should only happen once and take roughly as much memory as the file is big.

If the file is 20k, memory should go up roughly by that much.

If it's going up a lot more, something is going wrong (either you're doing something wrong or you're not just reading the template - you're doing something else along with that).

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux