PHP and MySQL related performance issues can be hard to track down. Luckily, Magento 2 comes with its own built-in profiler to help you do this. Only use it on a Staging account: it has a performance impact and it shows debugging information on the pages of your webshop. It also needs to run in developer mode (which staging normally uses) to produce the HTML output.
Below are the steps to enable the profiler and track down issues:
Make sure your code on Staging is in sync with production
Make sure your database on Staging is in sync with production
Reproduce the issue on staging, for example go to a slow page. To make sure you don't hit Varnish or the full-page cache, add ?no_cache=1 to the end of the URL
Use SSH to go to the Magento 2 directory and execute:
bin/magento dev:profiler:enable html
# html is the profiler output type — don't omit itHit the slow page again
Scroll to the bottom of the page, there is a table with load times
Find the element with the highest value in the 'Time' column
You will now have a good indication where the most time is spent
To disable the profiler, use SSH to go to the Magento 2 directory and run:
bin/magento dev:profiler:disableDat is fantastisch!
Hartelijk dank voor uw beoordeling
Sorry dat we u niet konden helpen
Hartelijk dank voor uw beoordeling
Feedback verzonden
We stellen uw moeite op prijs en zullen proberen het artikel te verbeteren