2

EDIT:

Developer Mode: Waiting TTFB => 121ms
Production Mode: Waiting TTFB => 224ms

(It's the first html that loads, the page) It's that delay I feel when browsing.

While using Magento 2.2.1, page load is 200ms slower in production mode than developer mode.

In developer mode, the website feels also faster, which is weard.

Using Chrome DevTools Dom Content Load is 624ms on dev vs it is 830ms on prod. In addition, the total loading time is 1.44sec on dev and 1.6-1.7sec on prod.

Any idea why this happens?

I have enabled minification of CSS and javascript.

PS: I also feel a difference when using in developer mode. It's not just the 200ms. It just feels instant. "With production mode" I feel "a delay after the mouse click on links. (like this ms delay).

I'm confused, normally the production mode should be faster.

Maybe I need to adjust some settings on the server?

7
  • Everything is the same except you are changing bin/magento deploy:mode:set production, right? Commented Nov 14, 2017 at 20:11
  • Yes, indeed. It does minify javascript en css in production mode. Even if i disable minify it's still the same.
    – Fancyman
    Commented Nov 15, 2017 at 19:09
  • Have you added any custom theme or any custom module that load on the home page. Could you share dev url so I can see and suggest you.
    – Nits
    Commented May 25, 2018 at 4:39
  • Additional information request, please. Post on pastebin.com or here. RAM size of your MySQL Host server A) complete (not edited) my.cnf-ini Text results of: B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) complete MySQLTuner report Optional very helpful information, if available includes - top for most active apps, ulimit -a for a linux/unix list of limits, iostat -x when system is busy for an idea of IOPS by device, for server tuning analysis. Commented Jul 23, 2018 at 8:38
  • @Fancyman Have you found a solution to this? I'm facing exactly the same issue. that my website has a better TTFB in developer mode than production mode. Commented Sep 21, 2018 at 9:22

1 Answer 1

1

"since years" (M2.1.x, M2.2.x, M2.3.x) production mode is slower. We run only in development mode.

2
  • Hmm, interesting. :-D My experience is just the same, with developer mode performing better in terms of page load times. Commented Sep 30, 2019 at 17:28
  • is there any official comment on this, or other info that might explain why dev mode runs faster?
    – paj
    Commented Mar 5, 2020 at 20:51

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.