Re: Doctrine madness!

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

 



On Thu, Jun 16, 2011 at 12:51 PM, Nathan Nobbe <quickshiftin@xxxxxxxxx> wrote:
> 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
>

This might help

http://php.net/manual/en/features.gc.collecting-cycles.php

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




[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