Performance
To start measuring the performance of the demo website, we should again enable all the optimizations that we disabled in Chapter 1, Setting Up a Local Environment. To do so, simply comment on the inclusion of settings.local.php
in the web/sites/default/settings.php
file:
if (file_exists($app_root . '/' . $site_path . '/settings.local.php') && getenv('IS_DDEV_PROJECT') == 'true') { //include $app_root . '/' . $site_path . '/settings.local.php'; }
Clear the cache, and the demo website now runs with the production configuration.
There are different ways to measure a website’s performance, but the most used one is the suite provided by Google.
Google Lighthouse
Google Lighthouse is an open source tool developed by Google that provides developers and website owners with valuable insights into the performance, accessibility, SEO, and best practices of their websites. It is an...