Hi !!

1 copy for the function call
1 copy for the return from str_replace

if passing $message by reference does not cause any problem
it may help to reduce the memory usage.

On 10/21/05, Lonnie Olson <[EMAIL PROTECTED]> wrote:

Does anyone have a clue why this particular statement would create 2
more copies of the message body in memory?

---------------
function iil_C_Append(&$conn, $folder, $message){
       if (!$folder) return false;
       $fp = $conn->fp;
dbg_memory();
       $message = str_replace("\r", "", $message);
dbg_memory();
--------------
results with a 2.5M message
Oct 21 15:44:39 /home/f/fungus/public_html/mail/program/lib/imap.inc
[1886]: E_USER_NOTICE: Memory used: 12796160
Oct 21 15:44:39 /home/f/fungus/public_html/mail/program/lib/imap.inc
[1888]: E_USER_NOTICE: Memory used: 18044080

This is the block in the Iloha library that is creating the two extra
copies in memory.  Perhaps it is a PHP bug?

--lonnie







--
Christopher A. Watford
[EMAIL PROTECTED]
http://dorm.tunkeymicket.com
http://www.theroadtrip2005.com




--
Salu-2 y hasta pronto ...

The dentist said my wisdom teeth were retarded.

----------------------------------------------------------------
   David Saez Padros                http://www.ols.es
   On-Line Services 2000 S.L.       e-mail  [EMAIL PROTECTED]
   Pintor Vayreda 1                 telf    +34 902 50 29 75
   08184 Palau-Solita i Plegamans   movil   +34 670 35 27 53
----------------------------------------------------------------




Reply via email to