ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 8 replies, has 5 voices, and was last updated by asolonenko asolonenko 9 months, 3 weeks ago.

  • Creator
    Topic
  • #17541

    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
  • #17625

    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!

    #21652
    asolonenko
    asolonenko
    Oro Core

    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.

    #23131

    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.

    #23219

    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

    #23485
    asolonenko
    asolonenko
    Oro Core

    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.

    #23493

    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.

    #24585

    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

    #24591
    asolonenko
    asolonenko
    Oro Core

    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)

You must be logged in to reply to this topic.