08-22-2008, 10:11 AM
[eluser]Frychiko[/eluser]
Hi,
I have a callback function used in a function which parses large xml/csv feeds (up to around 200MB feeds), so it gets called tens of thousands of times during an import of a feed.
Basically when the callback function is blank, memory usage does not increase:
BUT...
when I make a single call using the active record db class, memory usage starts climbing.
Merchant_model.php below:
Memory keeps going rising until the memory limit is exhausted. Why is the memory not freed?
cheers,
Frychiko
Hi,
I have a callback function used in a function which parses large xml/csv feeds (up to around 200MB feeds), so it gets called tens of thousands of times during an import of a feed.
Basically when the callback function is blank, memory usage does not increase:
Code:
function import_record_handler($record)
{
return;
}
BUT...
when I make a single call using the active record db class, memory usage starts climbing.
Code:
function import_record_handler($record)
{
$exists = $this->CI->Merchant_model->get_temp_category_where(array(
"name" => $raw_category,
"merchant_id" => $this->merchant_id
));
return;
}
Merchant_model.php below:
Code:
function get_temp_category_where($data)
{
$this->db->where($data);
$query = $this->db->get($this->table_temp_category);
return $query->row();
}
Memory keeps going rising until the memory limit is exhausted. Why is the memory not freed?
cheers,
Frychiko