Hello 

i have a class to import files 
i read in a file (size 30 MB) line by line
in the first example memory usage ist the same


class myimp {


function myimp()


function Start()
{
  fp = fopen (...)

  while ($buffer = fgets(fp, 500))
  {
   // here i can check the data nothing wrong memory is the same
   unset ($buffer);
  }

 fclose(fp)
}

}

this works fine and consume during the loop always (nearly the same
depends on $buffer) same memory

if i add a simple function into the while loop 
the memory usage grows 

function _import_db($data)
{
  $sql = "INSERT ....  ".
        "VALUES ($data[1],$data[2])";

  unset ($sql);
}

only the building of the string consumes more memory in every loop !?

I don't know what to do

BR/Torsten Rosenberger

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

Reply via email to