Symfony2 Slow Initialization Time

前端 未结 9 1707
一生所求
一生所求 2020-11-29 15:32

I have Symfony2 running on an Ubuntu Server 12.04 (64-bit) VM (VirtualBox). The host is a MacBook pro. For some reason I am getting really long request times in developmen

9条回答
  •  囚心锁ツ
    2020-11-29 16:19

    I had problems as well with slow page loads in development, which can extremely frustrating when you're tweaking CSS or something similar.

    After a bit of digging I found that for me the problem was caused by Assetic which was recompiling all assets on every page load:

    http://symfony.com/doc/current/cookbook/assetic/asset_management.html#dumping-asset-files-in-the-dev-environment

    By disabling the use of the Assetic controller I was able to drastically increase my page load. However, as the link above states, this comes at a cost of regenerating your assets whenever you make a change to them (or set a watch on them).

提交回复
热议问题