Doctrine with large datasets
Does anyone have experience using Doctrine with large datasets? I have a开发者_StackOverflow社区n import script that uses Doctrine and it uses way too much memory. The speed isn't a huge problem but the memory usage is. Does anyone have any tips for keeping Doctrine's memory usage down?
In Doctrine 1.2 at least, freeing objects after use frees up memory, which is recommended for long-running scripts:
$my_object->free();
There's a few tips on improving performance at the end of the official guide:
http://www.doctrine-project.org/projects/orm/1.2/docs/manual/improving-performance/en
精彩评论