Doctrine madness!

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

 



Hi gang,

If anyone out there has some experience w/ Doctrine now would be a great
time to share it!

So I'm writing a batch importer and noticed memory usage climbing during
script execution.

In the debugging effort I've isolated it down to a Doctrine issue.

Here's what's going on, I instantiate a model object for the product table
from my application

$newRecord = new Product();

at this point memory usage goes up noticeably.  I don't really care though
because I figure I can delete it, but look at this madness I have going
(which *fails* to free up the memory)

$newRecord->clearRelated();
$newRecord->free();
unset($newRecord);
gc_collect_cycles();

after all of this memory consumption is still dramatically higher than prior
to the first call creating the object above.  This I've verified through
memory_get_usage().

here's the output from the memory_get_usage() calls

int(166461440) // before new Product()
int(169345024) // directly after new Product()
int(169345024) // after madness trying to free memory used by new Product()

I've also tried an explicit call to the destructor of $newRecord, but that
results in a fatal attempting to call an unknown method.

Any help would be greatly appreciated as google hasn't been able to point me
to the answer thus far.

thx,

-nathan

[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