Magento – How to optimize magento 2 performance at the first time

magento2performance

After deploying production mode, merge js and css, minify HTML, Compile codes, enable Opcodes, Gzip, enable all caches (except "Varnish caches"),

I still see magento2 consume about 6-15s for the first time. From the 2nd time, it works smoothly.

The question is How I can improve performance for the first time request ?
I used XAMPP, PHP7 on window 8.

Best Answer

you need to use:
https://nghttp2.org/blog/2015/02/10/nghttp2-dot-org-enabled-http2-server-push/

When you access https://nghttp2.org via HTTP/2 protocol, CSS file /stylesheets/screen.css is pushed to client. If you inspect the response header closely, you will find Link header field like this:

link: </stylesheets/screen.css>; rel=preload; as=stylesheet