Add new comment

You are welcome to help!

https://www.drupal.org/node/1744302 was open since almost day 1 of Drupal 8 or at least as soon as the router was merged.

We (as the twig team) early on worked hard to micro-improve the performance of l() while improving its DX. Later all that work was thrown away as the Symfony CMF generator took over.

Are there things that are too complex in Drupal 8? - Yes, there unfortunately are. We have put layers on top of layers, which had been put on top of other layers already. I imagine in Drupal 9 we will start cleaning up, but its way too late to do anything about it right now - except convert likely some of the most slowest subsystems (TypedData, Yaml parsing, Twig's getVariable()) to native C extensions for PHP < 7 (and maybe even PHP 7) [for yaml and twig such extensions already exist].

So our best chance is caching and micro-caching. Or in other words the battle plan is:

  • Can we reduce the work we do in the "critical path"?
  • If not, can we generate it before we get to the "critical path"?
  • If not, can we cache it?
  • Can we cache it with a good granularity?
  • Can we cache it with a long max-age?
  • If not, can we defer rendering / executing it?

If you have any ideas, benchmarks, etc. how to improve the "critical path" of Drupal 8's performance, please chime in now! Benchmarking (XHProf), proposing solutions, good new ideas are very very very welcome. Looking forward to see you in the issue queues and in #drupal-performance! (if you want) Thanks,