Drupal 8: perf & ops — cache tags & pluggable asset optimization
For this short talk, I chose two particular improvements in Drupal 8 that will make a big difference for future Drupal sites’ performance and ops (infrastructure requirements).
The addition of cache tags is the most important new feature to have a huge impact on back-end performance: it allows for much smarter/better cache invalidation, and hence through better cache hit ratios help increase performance and reduce infrastructure requirements.
On the other hand, the move towards a pluggable asset optimization system (instead of the non-pluggable one in Drupal 7) allows for much greater flexibility in adjusting the asset optimization pipeline to suit a specific site’s needs. Changing the JS minifier or even the complete asset optimization pipeline will become easy, whereas in Drupal 7 you’d need incredibly intricate knowledge of other Drupal internals — making such front-end performance changes much more expensive than they should be.
Neither helps current production sites on Drupal 7 since they’re major improvements in Drupal 8, but both solve fundamental flaws in previous versions, so they will probably make you (even more) excited about Drupal 8!
Note: these slides are a shortened version of my Building really fast websites with Drupal 8 talk — but presented from a different angle and with a different focus.
Comments
Pluggable asset optimization can sorta be achieved (via hooks) in D7 if using AdvAgg; all the advagg submodules use advagg hooks. The bundler submodule will do globally optimal groups as well.
Indeed: sorta :) You first have to install AdvAgg, and only then you have a workable API.
I now regret not having called out AdvAgg as the (only) viable alternative in Drupal 7 :( If I ever deliver this talk again, I’ll make sure to point this out!
P.S.: while refactoring the asset optimisation handling in Drupal 8 to have pluggable services, I looked at two things: logical independence of each of the pluggable services, and how AdvAgg did things. In other words: AdvAgg in Drupal 8 should be significantly simpler to implement :)