Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The most time consuming thing that Doctrine does is load metadata for your entities, whether it's annotations, XML, or YAML. Doctrine lazy loads the metadata when possible, so you will not see the performance hit until you start using entities. Since the metadata doesn't change unless you make changes in your code, Doctrine allows you to cache the metadata across requests. DQL queries also need to be parsed into SQL, so Doctrine provides another caching configuration for this.</p> <p>In a production environment you should set these caches up (it sounds like you have already, but for others reading this):</p> <p><code> $cache = new \Doctrine\Common\Cache\ApcCache(); // or MemcacheCache $configuration-&gt;setMetadataCachImpl($cache); // caches metadata for entities $configuration-&gt;setQueryCachImpl($cache); // caches SQL from DQL queries </code></p> <p>In order to prevent the first page load from taking the full metadata load, you can set up a cache warmer that loads all of the class metadata and save it to the cache.</p> <p><code>$em-&gt;getMetadataFactory()-&gt;getAllMetadata();</code></p> <p>Another potential bottleneck is the generation of proxy classes. If this is not configured correctly in a production environment, Doctrine will generate the classes and save them to the file system on every page load. These proxy classes do not change unless the entity's code changes, so it is again unnecessary for this to happen. To speed things up, you should generate the proxies using the command line tool (orm:generate-proxies) and disable auto-generation:</p> <p><code> $configuration-&gt;setAutoGenerateProxyClasses(false); </code></p> <p>Hopefully this helps you out. Some more information can be found at <a href="http://www.doctrine-project.org/docs/orm/2.0/en/reference/improving-performance.html#bytecode-cache" rel="nofollow">http://www.doctrine-project.org/docs/orm/2.0/en/reference/improving-performance.html#bytecode-cache</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload