Useful tips for symfony2/doctrine optimization

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.

About 

Hi, I'm a Berlin-based developer and working on webstuff since 2000. My focus lies on PHP, TYPO3 and Symfony. 2009 I became a certified TYPO3-Integrator. I worked on projects for clients like Paypal, Union Investment, Commerzbank or Warsteiner.

Go check out my page http://www.christian-baer.com

Published by

Christian Baer

Hi, I'm a Berlin-based developer and working on webstuff since 2000. My focus lies on PHP, TYPO3 and Symfony. 2009 I became a certified TYPO3-Integrator. I worked on projects for clients like Paypal, Union Investment, Commerzbank or Warsteiner. Go check out my page http://www.christian-baer.com

One thought on “Useful tips for symfony2/doctrine optimization”

  1. 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!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">