DrupalCon New Orleans 2016: The future of Drupal Performance - Parallel worlds
Channel: Drupal Association
Date: 2016-05-11

Drupal 9 could be faster than ever before!

The times are exciting! Drupal just started into its 8 cycle and the world is not standing still.

However even with all the new technologies of PHP 7, dynamic page cache, BigPipe, Placeholders, etc. Drupal 8 still has a quite slow bootstrap phase, the internal page cache could be faster and a lot of time is wasted while waiting for I/O (Files, Database, APC, memcache, http requests, ...) and rebuilding of caches.

PHP is ready! Are you?

Lets explore together in this core conversation how the future of Drupal performance could look and what we need to change internally to ensure we get back on par to fast-response systems like NodeJS.

One such thing that Drupal could start doing is to start using a parallelized approach. While Drupal is waiting, it could do other CPU intensive tasks until those are blocked again on I/O, then get back to the original task, etc.

For this we need a kind of event loop and a different structure within Drupal. But PHP is ready: Technologies like ReactPHP, icicle.io, etc. are stable now, libevent has seen continued development and been used by Facebook since quite a while and HHVM already has true asynchronous function calls, while PHP 7 is debating them at least.

Lazy load everything

We would also need a more "passive" bootstrap process, where things are loaded much more on demand and we go away from a pure request/response chaining model. This is a next step into utilizing services even more.

Examples:

When the current user is first used somewhere (as a service), he would be authenticated automatically.
When the current route is used for the first time, routing occurs.
When the current session is used, the session is verified.
...
This would allow to skip slow and problematic parts of the bootstrap process and such easier allow a pre-bootstrap dynamic page cache.

Lets start into the future of Drupal performance together! Now!

Audience

Core Developers and Developers interested in innovative performance concepts
Helpful Knowledge

Drupal basics
Drupal render pipeline basics: https://www.drupal.org/developing/api/8/render/pipeline
Symfony Stack Basics (HttpKernel, Container, )
Any Async PHP knowledge is a plus, but not expected
Goals

Explore current status of Drupal performance in different stages.
Ensure Drupal 8/9 performance is fit for the future.
Explore what performance can be like in the future.
Discuss event loops, parallel rendering, Drupal workers, pre-bootstrap dynamic page cache, ...
Summary

The presenter has brought innovative render caching concepts into Drupal 8 and explored with BigPipe together with WimLeers a new approach to ensure all pages can be fast. This is bringing these introduced concepts to a new level of performance possibilities and bridging the gap from Symfony performance concepts to new async PHP libraries (e.g. icicle.io).