Fatal error: Allowed memory size of 134217728 bytes exhausted.
There are a few cases where I need to create 10’s of thousands of results, but obviously this is causing huge memory issues. Are there any ways of reducing the memory on large query sets?
It depends on how you will use the results:
can change hydration mode:
->setHydrationMode(Doctrine::HYDRATE_ARRAY)can be used to retrievedata in a multidimensional array (other hydration mode can be found
on doctrine documentation)
$myobject->free(); /* if using php 5.2 also unset($myobject) */look also at doctrine docs on performance improving
sfConfig::set('sf_debug', false);