Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Why Symfony 4 is faster

Tom
January 11, 2018

Why Symfony 4 is faster

A brief look at some of the changes that make Symfony 4 faster than 3.x

Tom

January 11, 2018
Tweet

More Decks by Tom

Other Decks in Programming

Transcript

  1. Throw the baby out with the bathwater Step 1: delete

    all the things. The default installation of symfony 4 doesn’t include Doctrine, Twig, Swiftmailer, translations, validation or even sessions! It won’t be quite so fast or lightweight once you add all of that back.
  2. Dependency Injection Container • require_once > autoloading (#24872) • Private

    services ◦ Removal of unused services ◦ Inline trivial private services (#23674) • Generate one file per service factory (#23678) • Inline references to class constants (#25474)
  3. Router • Optimise the matcher and avoid function calls (#21755)

    • Optimise grouping of similar routes (#21926) • Check the uniqueness of routes only once (#24556) Most routing optimisations are only noticeable for applications with a large number of routes (>500)
  4. Further Reading My slides with links to the PRs will

    be available Fabien’s blog post: http://fabien.potencier.org/symfony4-performance.html