When looking at a profile on why Magento 2 is super slow, I see that
Less_Parser::getCss() takes 47 seconds.
Why is the server parsing LESS in production mode?
I am using
I am also using an aftermarket theme called
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.Sign up to join this community
This routine is going to be invoked unless you compile your LESS files via 'bin/Magento setup:static-content:deploy`.
Otherwise, Magento has to render all CSS files on every page request, that slow downs your server.
I also highly recommend to validate your installment with recommended production settings turned on:
I found the cause on my project.
Check your error log, if some css files are not well defined in the xml, Magento cannot create the merged minified file and then Magento will try to regenerate it for each request.
Moreover, if you have different css files for each request, Magento needs to rebuild the merge css file too on these requests. Check if you have some files in
You can also check that you web server environment variable do not override the production mode