Slide 5
Slide 5 text
DrupalCon Prague 2022 | Drupal performances | Nicolas Perussel
Basics Drupal performance
Common advices
Drupal performance / Common
Use internal cache
• Use PHP 8 or newer version ASAP
• Avoid to install or use lot of modules (impact on discovery, code parsing …), be defensive
• Use code linter to fix FQFN (function opcode inlining - Ex: \strlen())
• Use the DIC like a Symfonist (tag, compiler pass and other fun things), the ServicesProviderBase is
made for this
• Avoid to load unnecessary entities
• Avoid to use views for any needs (SQL RAW Query + cache are often better)
• Disable Watchdog and prefer the usage of Monolog
• Log Slow SQL query + EXPLAIN
• …
• Cache ALL things as soon as possible! (render, block, views, entities …)
• Configure your cache backend (next Chapter)