Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 305165

Make the router ClassProvider aware and get rid of lazy route filters and route enhancers

$
0
0

Problem/Motivation

In the road of simplifying the routing system, I would like to propose another change.
Back in 2015 when we tried to get Drupal 8 out and routing was one of the major performance issues, we decided to move the routing system to become more lazy. One step of that was to introduce the idea of lazy route filters and enhancers, so services, which aren't loaded on every request.

There are a couple of problems with them though:

  • Its hard to debug (you filter go to all route filters and then you do another loop)
  • The priorities are not taken into account properly (they aren't shared between lazy and non lazy route filters)
  • The additional layer of indirection is also potential a bit slower

Proposed resolution

  • Make every route filter and enhancer "lazy"
  • Make the router aware of the class resolver
  • Inject all route filter/enhancer IDs into the router class.

Remaining tasks

User interface changes

API changes

Data model changes


Viewing all articles
Browse latest Browse all 305165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>