OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – Programming Questions How to speed up the debug speed?

This topic contains 8 replies, has 5 voices, and was last updated by  asolonenko 7 years, 4 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #25151

    woei66
    Participant

    Hi,

    I am developing a AppBundle for orocrm and I use app_dev.php/xxx to test my function.
    The page response time is very very slow when I change the controller or template or entity..

    If I use app.php, I need to clean cache by php app/console cache:clear and the action is also very very slow.

    Any suggestion?
    Thank you.

    David

Viewing 8 replies - 1 through 8 (of 8 total)
  • Author
    Replies
  • #25152

    archy_bold
    Participant

    In my experience, Oro uses quite a lot of resources, so can be a little slow when developing locally. If you use a virtual machine for development, try increasing the amount of resources (memory, CPU) the machine has available.

    Also ensure you’re running as few programs on your host machine as possible and stop any applications that appear to be using more resources than others. I found Spotify was being quite a CPU hog and made it very difficult to use Oro. Closing that really made a difference. Back to CDs then!

    #25153

    asolonenko
    Participant

    Hi,

    thanks for your appeal. We’ve investigated this issue and found how to fix it for controllers. The main issue was that container fully rebuilds after changes in these files. Now if you make changes in controller it will have impact only on acl annotation cache.

    All the mentioned changes will be included into upcoming release.

    #25154

    hecalu
    Participant

    Hi Asolonenko,

    Would you mind to point the corresponding commit or impacted class of this cache rebuilding enhancement please ?
    My team and I, are stuck on an old version (1.8.2) of OroCRM and can’t upgrade it at this moment.
    It’ll be a big improvment for us, regarding the time we spent when we work on Config and Controller files.

    Thanks in advance for your feedback.

    Best regards,

    Lucas.

    #25155

    hecalu
    Participant

    Can someone help me on this subject ?
    We haven’t found a way to reduce the cache rebuilding process when working on config/controller files.

    Thanks in advance,

    Lucas

    #25156

    asolonenko
    Participant

    Hi! Sorry for waiting.

    Please look at the
    https://github.com/orocrm/platform/blob/master/src/Oro/Bundle/SecurityBundle/Annotation/AclListener.php
    https://github.com/orocrm/platform/blob/master/src/Oro/Component/Config/Dumper/CumulativeConfigMetadataDumper.php

    Here we use separate Metadata dumper for acl annotations that earlier affects on container build. We move them to cache and now if you edit controller it will rebuild only annotations cache but not container.

    Feel free if you have any questions about it.

    #25157

    hecalu
    Participant

    Many thanks for your help.
    We gonna investigate how to correctly set it up.
    I’ll let you know if we encounter some difficulties on this.

    Lucas.

    #25158

    thomasEpsi
    Participant

    Hi Asolonenko,

    I’m working in the Hecalu’s team , and i’m trying to reduce the cache rebuild process time regarding to your answer.
    After making the changes that you have recommended, the rebuild cache process take the same time to rebuild.
    Furthermore, i had to add services :

    For AclListener class Oro\Bundle\SecurityBundle\Annotation\AclListener :

    For MetadataDumper Oro\Component\Config\Dumper\CumulativeConfigMetadataDumper :

    Also, i had to declare an other service called during the preFLush event trigger :

    Regarding that, i added die() function in each function of the three classes : the system stop well, so the class are well loaded.
    Could you please let me know if there any other modifications to do, in order to make it work ?

    Thanks in advance,

    Thomas

    #25159

    asolonenko
    Participant

    Hi!

    Be sure that you don’t add provider for metadata to container in DependencyInjection file and check that cache created in proper cache directory. In my case it’s in cache/dev/oro_data/oro_acl_annotations and I have special meta file with resources cache/dev/oro/Oro_config_meta/oro_acl_annotation.meta. In your case name of file could be another.

Viewing 8 replies - 1 through 8 (of 8 total)

The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.

Back to top