Nathaniel Catchpole has been using Drupal since version 4.5, and has been a regular contributor to Drupal core since 2006; along with extensive code profiling, he has contributed over 400 patches to the Drupal 7 release. He also maintains the core entity, cache and taxonomy subsystems, as well as the memcache and entity cache contributed projects. In September 2011, Nathaniel became branch maintainer for Drupal 8. Nathaniel is a co-author of the O'Reilly book High Performance Drupal. He has been with Tag1 Consulting since September 2010. When we added Gander performance tests to Drupal CMS, we uncovered several opportunities for improvements that benefit Drupal CMS users and the broader Drupal community. Our systematic approach to testing revealed optimization opportunities in both core and contributed modules. This resulted in substantial performance gains and key insights for future improvement, which we’ll break down below. One of our most notable findings involved the Klaro cookie consent module, which ships with Drupal CMS’s privacy recipe. Initial testing revealed that anonymous users were downloading over 200KB of JavaScript immediately after installation, with Klaro responsible for more than 90% of this load. Through collaborative efforts with Klaro and Drupal CMS privacy track maintainers, two major improvements were implemented. First, the library size was reduced to around 64KB by optimizing the build process and removing support for outdated browsers. More significantly, Klaro now loads only when actually needed — for instance, when a site includes embedded YouTube videos requiring consent. This optimization, implemented by Jürgen Haas (@jurgenhaas), resulted in zero JavaScript overhead for fresh installations. The solution leverages ECA (Event-Condition-Action), already included with Drupal CMS, to progressively change configuration without requiring custom modules. Learn more: Using Gander for performance testing and DDEV’s xhprof support, we discovered an unexpected issue with the Coffee module, which provides administrative search functionality. What would normally be a single page request was triggering an additional request and causing dozens of database queries to execute, even with warm caches. Further investigation showed that the module was making AJAX requests on every page load, regardless of whether the search feature was being used. The solution was straightforward but impactful: we modified the module to only make its AJAX request when a user opens the Coffee search modal. This change has been incorporated into the latest release, improving performance for all sites using this module. Learn more: Our testing process uncovered that Drupal core’s experimental Navigation module was generating numerous unnecessary menu tree queries. While there was an existing issue to optimize menu tree rendering, we identified a simpler solution: implementing a dedicated render cache entry for the module. This reduced the number of database queries by 20 per page request by caching the navigation globally for the site instead of once per page through the dynamic_page_cache module. As part of core, this optimization benefits not only Drupal CMS sites but all Drupal installations using the experimental module. The fix has been committed and will be available in the next Drupal core patch release. Learn more: Another core module highlighted by our performance testing is the Language module. According to our tests, uncached database queries were executing on every page load. The queries no longer appeared after the module was removed from the Drupal CMS SEO recipe. This led to the creation of a new core issue by Sascha Grossenbacher (@berdir) to implement proper query caching. Learn more: While investigating out-of-memory errors in the Project Browser, we discovered that Drupal’s new Recipes API wasn’t taking advantage of Drupal’s bulk module installation optimizations. Instead, it installs modules one by one, bypassing existing performance optimizations for concurrent installation. Addressing this issue promises to significantly improve the speed and memory efficiency of applying recipes. Learn more: During memory profiling of Drupal CMS, we identified potential optimizations for Drupal's chained fast cache backends. This demonstrates how performance testing of Drupal CMS can lead to improvements in Drupal core itself and enhance efficiency across all Drupal installations. Learn more: Performance testing of Drupal CMS yielded benefits beyond optimization. Using Drupal’s PHPUnit test framework helped identify a major bug with Drupal CMS’s default front page redirect functionality — discovered within a few minutes of implementing the initial test coverage. Additionally, because Drupal CMS depends on contributed modules, a new release can change behavior or introduce regressions. To catch potential issues before they affect end users, we recommended adding nightly testing against development versions of dependencies. Adam G-H (@phenaproxima) implemented the testing within hours of the issue being opened. It immediately began identifying regressions introduced in contrib modules before they could impact stable releases of Drupal CMS. Learn more: Our performance testing initiative demonstrates the power of systematic testing in uncovering optimization opportunities across the Drupal ecosystem. These improvements extend beyond Drupal CMS, creating a ripple effect that enhances performance for hundreds of thousands of Drupal sites worldwide. By increasing the review of Drupal CMS and the contributed modules it includes, we’re driving improvements to performance that benefit the entire Drupal community. Want to learn more about performance testing in Drupal? Join us in making Drupal faster and more efficient for millions of users worldwide. Here are resources to get you started: Image by Karl Egger from Pixabay © Copyright 2025 Tag1 Consulting, Inc. · 7901 4th Street N #5853, St. Petersburg, FL 33702 877-875-8824 (toll free) · 561-952-6824 Drupal is a registered trademark of Dries Buytaert. Trust Center | Terms of Service | Privacy Policy
Content