Symfony 7: Out-of-the-Box Performance Tweaks for Developers

Bhavin Nakrani
Symfony Mastery
Published in
4 min readAug 21, 2024

--

Symfony is already fast when you start using it, but you can make it even faster by optimizing your servers and applications using the performance tips in this checklist.

Performance Checklists

Use these checklists to ensure your application and server are set up for the best performance:

Symfony Application Checklist:

  • Install APCu Polyfill if your server uses APC.
  • Limit the number of enabled locales in your application.

Production Server Checklist:

  • Combine the service container into a single file.
  • Enable the OPcache bytecode cache.
  • Set up OPcache for peak performance.
  • Disable checking PHP file timestamps.
  • Configure the PHP realpath cache.
  • Optimize the Composer autoloader.

Install APCu Polyfill if your server uses APC

If your production server is still using the old APC PHP extension instead of OPcache, you should install the APCu Polyfill component in your application. This will make your application compatible with APCu PHP functions and allow you to use advanced Symfony features like the APCu Cache adapter.

--

--