Magento 2 goes terribly slow (Developer mode)

Asked
Active3 hr before
Viewed126 times

7 Answers

90%

Be sure Magento is set to developer mode: php bin/magento deploy:mode:set developer,ALL CACHES ENABLED except FPC. Whenever I need to test a change involving config files, etc I manually delete the content of the var/cache folder or the generated/code folder for DI changes. The cache type that specially slows down everything is the Configuration cache, so it must be enabled or the frontend/backend pages will load painfully slow.,The aged linux box with anaemic RAM, an old SSD, stock Apache and no fancy cache things completed the task without problem, I was able to switch between developer and production modes effortlessly and get what had taken me days to not do done in minutes.,This I have experienced first hand, from working in an office where the options are Mac or Windows. After spending a whole day trying to change the template directive and failing to make one configuration change in 8 hours, I thought about giving it a go on a linux box to see if I had gone mad or if this Vagrant contrivance is as helpful as that drunken bum sleeping rough in the park down the road.

If you work in developer mode you need to disable JS/CSS merge, disable xdebug and enable opcache. Feel free to run thes MySQL queries on your dev DB and flush cache. This will increate the site performance in developer mode.

UPDATE core_config_data SET value = '0'
WHERE path = 'dev/css/merge_css_files';
UPDATE core_config_data SET value = '0'
WHERE path = 'dev/css/minify_files';
UPDATE core_config_data SET value = '0'
WHERE path = 'dev/js/merge_files';
UPDATE core_config_data SET value = '0'
WHERE path = 'dev/js/minify_files';
UPDATE core_config_data SET value = '0'
WHERE path = 'dev/js/enable_js_bundling';
UPDATE core_config_data SET value = '0'
WHERE path = 'dev/static/sign';
88%

If you work in developer mode you need to disable JS/CSS merge, disable xdebug and enable opcache. Feel free to run thes MySQL queries on your dev DB and flush cache. This will increate the site performance in developer mode.,3. do not enable xdebug. 4. disable cache only if you are reloading page too many times in a row.,In "developer" mode, all caches were disabled.That why magento become slow. I suggest to enable caches by execute command ,However, you need to clean cache ./bin/magento cache:clean every time you modify xml files or configurations.

If you work in developer mode you need to disable JS/CSS merge, disable xdebug and enable opcache. Feel free to run thes MySQL queries on your dev DB and flush cache. This will increate the site performance in developer mode.

UPDATE core_config_data SET value = '0'
WHERE path = 'dev/css/merge_css_files';
UPDATE core_config_data SET value = '0'
WHERE path = 'dev/css/minify_files';
UPDATE core_config_data SET value = '0'
WHERE path = 'dev/js/merge_files';
UPDATE core_config_data SET value = '0'
WHERE path = 'dev/js/minify_files';
UPDATE core_config_data SET value = '0'
WHERE path = 'dev/js/enable_js_bundling';
UPDATE core_config_data SET value = '0'
WHERE path = 'dev/static/sign';
load more v
72%

Developer mode takes 12-30 seconds for first byte for home page with a fresh install using the setup wizard.,My best single page loading time for the standard /customer/account/ page is ~10 seconds with all caches enabled, compiled successfully and in developer mode.,But, some people here are reporting fast load times, so I have to think that it is a configuration issue.,PHP version 5.6. I don't enable any kind of cache. My idea is that Magento should not be that slow even without cache. It is not reasonable. A month or two ago i tried an eariler version and it was fast, installed on the same machine, same environment. If it loads 10 - 30 seconds on local, it must be something else rather than just cache. It goes from amazingly fast to terribly slow.

                                                                                  Did you say sub - second ? Does this include category and product detail pages ? And in developer - mode ?
load more v
65%

I have been developing on a magento2 docker env (warden) environment for weeks with no problems. Development mainly on the frontend in developer mode, deactivating only the full_page, block_html and layout caches. Normally the site loaded at an acceptable time (20-30 seconds) while clearing the entire cache it loaded in 50-60 seconds.,Suddenly the environment became extremely slow. Each page loads in about 10-15 minutes, both on frontend and on backend and the CPU usage goes to the max value (there are always at least 5-6 processes php-fpm that consume the maximum available cpu). The browser loads 10 static files at a time (every 30 sec),Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up., Stack Exchange network consists of 178 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

1. Increase PHP memory_limit.
2. bin/magento catalog:image:resize (applicable if you have images)

Try php bin/magento setup:static-content:deploy -f or php bin/magento cache:enable

php bin / magento setup: static - content: deploy - f
load more v
75%

On the right, Magento 2 feels super-responsive. As you can see, there’s a considerable difference between the 2 examples. And right now, the version on the right is still in Developer Mode. But more on Modes towards the end of this video.,Why is Magento 2 so slow? The way in which Magento 2 is structured, is very clever as it improves the time and cost it takes to develop an eCommerce store. However, it also has the knock-on effect of slow performance and increased loading times if Magento isn’t setup correctly.,As you can see, I’m currently in Developer Mode.,Then under the “Storefront Properties” section, scroll down to “Used in Product Listing” and ensure this is set to “Yes”.

If we want to check which mode we are currently in, then simply type:

bin / magento deploy: mode: show(and hit Enter)
load more v
40%

Recently I started developing magento 2 projects.,Be sure Magento is set to developer mode: php bin/magento deploy:mode:set developer,This is my recipe for developing themes/modules in localhost for Magento 2.2 and 2.3:, Magento 2

If you work in developer mode you need to disable JS/CSS merge, disable xdebug and enable opcache. Feel free to run thes MySQL queries on your dev DB and flush cache. This will increate the site performance in developer mode.

UPDATE core_config_data SET value = '0'
WHERE path = 'dev/css/merge_css_files';
UPDATE core_config_data SET value = '0'
WHERE path = 'dev/css/minify_files';
UPDATE core_config_data SET value = '0'
WHERE path = 'dev/js/merge_files';
UPDATE core_config_data SET value = '0'
WHERE path = 'dev/js/minify_files';
UPDATE core_config_data SET value = '0'
WHERE path = 'dev/js/enable_js_bundling';
UPDATE core_config_data SET value = '0'
WHERE path = 'dev/static/sign';
22%

From the Admin panel, go to Store > Configuration > General. Click Web which is under the General tab. Then, you can explore the Base URLS (Secure) section and add HTTPS URLs.,From the Admin panel, go to Store > Configuration > Advanced. Under the Advanced tab, click System, you will see the Full Page Cache section. In this section, you change the Caching Application field value from Built-in Cache to Varnish Caching.,Following is the guide to minimize the Javascript and CSS in order to increase the speed of Magento 2:,Another reason which leads to the slow speed of Magento 2 is Javascript and CSS.

From the Admin panel, go to Store > Configuration > Advanced. Under the Advanced tab, click System, you will see the Full Page Cache section. In this section, you change the Caching Application field value from Built-in Cache to Varnish Caching.

Store > Configuration > Advanced

From the Admin panel, go to Store > Configuration > Advanced. Under the Advanced tab, click System, you will see the Full Page Cache section. In this section, you change the Caching Application field value from Built-in Cache to Varnish Caching.

Advanced

From the Admin panel, go to Store > Configuration > Advanced. Under the Advanced tab, click System, you will see the Full Page Cache section. In this section, you change the Caching Application field value from Built-in Cache to Varnish Caching.

System

From the Admin panel, go to Store > Configuration > Advanced. Under the Advanced tab, click System, you will see the Full Page Cache section. In this section, you change the Caching Application field value from Built-in Cache to Varnish Caching.

Caching Application

From the Admin panel, go to Store > Configuration > Advanced. Under the Advanced tab, click System, you will see the Full Page Cache section. In this section, you change the Caching Application field value from Built-in Cache to Varnish Caching.

Built - in Cache

From the Admin panel, go to Store > Configuration > Advanced. Under the Advanced tab, click System, you will see the Full Page Cache section. In this section, you change the Caching Application field value from Built-in Cache to Varnish Caching.

Varnish Caching
load more v

Other "undefined-undefined" queries related to "Magento 2 goes terribly slow (Developer mode)"