I need advice on the best way to approach this. The site is loading pages in 30 seconds, sometimes 1 minute. This will kill my traffic if it's rolled live.

Hosting said:

I ran an strace on one of the pages, which took 23 seconds to load completely, and ran an strace on it, which records every single system call made by the site during this loading time. There were no specific system calls taking more than than a few milliseconds excluding a call to the main Magento core bootstrap.php which is normal, and that in itself took 1.6 seconds from the total. The rest of the calls as mentioned take milliseconds each, but due to the amount of calls, 188979, the process just takes too long.

We have tried changing PHP version - it didn't work.

I tried several minor fixes like using a different PHP version, temporarily disabling opcache as there were a fair number of calls to files generated by it, but nothing much changes.

URL: Staging site - temp URL

1 Answer 1


On checking your site,

  1. Gzip compression is not enabled, if enabled it can reduce your page size to nearly 4 MB from 7 MB

  2. CSS and Javascript is not minified, it can save up to 1 MB.

  3. HTML Minification is not done.

You can follow the below practices to speed up the site.

  1. Switch your website to production mode

  2. Minify your HTML, CSS and js files.

  3. Merge your CSS and JS files.

  4. Optimize your images.

  5. Enable Gzip Compression.

  6. Ensure if Magento Full Page Cache is enabled. Can install and configure varnish to speed up the site

  7. Do Advanced Javascript Bundling following this link https://devdocs.magento.com/guides/v2.3/performance-best-practices/advanced-js-bundling.html as it will reduce total page size as well keeping the number of requests low

  8. Use the profiler to check files consuming more time. Check and ensure to load them in lesser time.

php bin/magento dev:profiler:enable html

php bin/magento dev:profiler:enable csvfile

  1. Consider Using Google Page Speed Module in your server where you can configure the optimization to speed up the page as well as increasing your google page speed score significantly. To see if this can solve all your problems https://developers.google.com/speed/pagespeed/module/

10.Enable Flat Categories and Products

  • Thanks for the detailed reply. I will give these instructions to my developer. I've done the easy ones myself via the Magento backend. Jul 3, 2019 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.