Hello Fellow Bakers!

I have developed an application to generate a family tree.
In one of my models, I have attached Tree Behaviour.

However, during my development, I encountered a memory exhaustion.
I noticed that in some of my data sets, I have more than 1 million
population to generate.
The users of my application are fine with the length of time to
generate the data, as long as they get the data.
An email notification is done whenever a generation is complete.
Each data set = 1 http request

I was very careful not to have any memory leak.
Every variable created was unset once it's no longer in use.
I unbind all unnecessary models during the query and also specially
select only fields I'll be using.

Finally, I used xdebug to monitor my memory usage by breaking points
whenever I invoke memory_get_usage().
I noticed that whenever I do a $this->model->save(), the memory usage
increases by 2000bytes on average.
Even after I did a $this->model->create(), the memory usage did not
reduce.
While this amount is considerably low, during huge data sets with many
iterations, these bytes really add up.

I need advice on these areas:
1) I want to identify where memory leak is. May it be MySQL or CakePHP
or my own mistake.
2) I want to clear the memory whenever I do a Model::Save().
3) I suspect a memory leak happens on Model::Find() too.

I have previously encountered a similar situation with my Financial
App (Stock Data) at
http://groups.google.com/group/cake-php/browse_thread/thread/3f4cfb807b5efb08/dce96997c3c3eb96?lnk=gst&q=memory+leak#dce96997c3c3eb96
I appreciate the many advices provided in that post and it has
assisted me to look into other work arounds.
Thanks for the fantastic community here at CakePHP
I look forward to everyone's response again! =D

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to