In the LinkedIn-symfony-group I stumbled upon a very useful link:
http://labs.octivi.com/mastering-symfony2-performance-doctrine/
This is a must-read for all doctrine-beginners, I wish i woud have read it when I started… Here are the points in short:
- use the Symfony Profiler toolbar
- avoid object hydration
- use IDs for referencing rather than whole object
- use update-statement
- use lazy collections
- never load entities in a loop
More infos can be found in the article.
Thanks Christian for sharing our article! We’re happy for such positive feedback
Btw. Check out our new post! It covers the fundamentals of Symfony performance optimization techniques.
We’re not ending the series – next article will show some cool features of S2 in comparision to the performance overhead they come with (Twig, Annotations etc.).
The series will end with the deep insight on our latest High-Performance Symfony2 platform – 700req/s, packed with HAProxy, Varnish and big, +160.000.000 keys, Redis cluster.
So stay tuned!