[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.226.166.207: ~ $
Improving Performance
=====================

Bytecode Cache
--------------

It is highly recommended to make use of a bytecode cache like OPcache.
A bytecode cache removes the need for parsing PHP code on every
request and can greatly improve performance.

    "If you care about performance and don't use a bytecode
    cache then you don't really care about performance. Please get one
    and start using it."
    
    *Stas Malyshev, Core Contributor to PHP and Zend Employee*


Metadata and Query caches
-------------------------

As already mentioned earlier in the chapter about configuring
Doctrine, it is strongly discouraged to use Doctrine without a
Metadata and Query cache.

Operating Doctrine without these caches means
Doctrine will need to load your mapping information on every single
request and has to parse each DQL query on every single request.
This is a waste of resources.

The preferred cache driver for metadata and query caches is ``PhpFileCache``. 
This driver serializes cache items and writes them to a file. 
This allows for opcode caching to be used and provides high performance in most scenarios.

See :ref:`integrating-with-the-orm`

Alternative Query Result Formats
--------------------------------

Make effective use of the available alternative query result
formats like nested array graphs or pure scalar results, especially
in scenarios where data is loaded for read-only purposes.

Read-Only Entities
------------------

Starting with Doctrine 2.1 you can mark entities as read only (See metadata mapping
references for details). This means that the entity marked as read only is never considered
for updates, which means when you call flush on the EntityManager these entities are skipped
even if properties changed. Read-Only allows to persist new entities of a kind and remove existing
ones, they are just not considered for updates.

See :ref:`annref_entity`

Extra-Lazy Collections
----------------------

If entities hold references to large collections you will get performance and memory problems initializing them.
To solve this issue you can use the EXTRA_LAZY fetch-mode feature for collections. See the :doc:`tutorial <../tutorials/extra-lazy-associations>`
for more information on how this fetch mode works.

Temporarily change fetch mode in DQL
------------------------------------

See :ref:`dql-temporarily-change-fetch-mode`


Apply Best Practices
--------------------

A lot of the points mentioned in the Best Practices chapter will
also positively affect the performance of Doctrine.

See :doc:`Best Practices <reference/best-practices>`

Change Tracking policies
------------------------

See: :doc:`Change Tracking Policies <reference/change-tracking-policies>`

Filemanager

Name Type Size Permission Actions
advanced-configuration.rst File 16.18 KB 0644
annotations-reference.rst File 37.16 KB 0644
architecture.rst File 7.52 KB 0644
association-mapping.rst File 31.32 KB 0644
basic-mapping.rst File 17.24 KB 0644
batch-processing.rst File 5.77 KB 0644
best-practices.rst File 3.61 KB 0644
caching.rst File 13.24 KB 0644
change-tracking-policies.rst File 5.13 KB 0644
configuration.rst File 4.29 KB 0644
dql-doctrine-query-language.rst File 60.95 KB 0644
events.rst File 30.98 KB 0644
faq.rst File 9.95 KB 0644
filters.rst File 3.38 KB 0644
improving-performance.rst File 2.66 KB 0644
inheritance-mapping.rst File 20.79 KB 0644
installation.rst File 131 B 0644
limitations-and-known-issues.rst File 7.66 KB 0644
metadata-drivers.rst File 6.02 KB 0644
namingstrategy.rst File 4.38 KB 0644
native-sql.rst File 34.31 KB 0644
partial-objects.rst File 3.52 KB 0644
php-mapping.rst File 8.82 KB 0644
query-builder.rst File 20.6 KB 0644
second-level-cache.rst File 24.02 KB 0644
security.rst File 4.68 KB 0644
tools.rst File 16.8 KB 0644
transactions-and-concurrency.rst File 13.9 KB 0644
unitofwork-associations.rst File 2.74 KB 0644
unitofwork.rst File 6.73 KB 0644
working-with-associations.rst File 22.24 KB 0644
working-with-objects.rst File 31.61 KB 0644
xml-mapping.rst File 27.11 KB 0644
yaml-mapping.rst File 4.42 KB 0644