3 ms·
Controller route prefixing seems suspicious. Do you include every controller at runtime and use php reflection with some regular expressions to parse all of the
by k4st 18y ago
Controller route prefixing seems suspicious. Do you include every controller at runtime and use php reflection with some regular expressions to parse all of their prefixes only to figure out what single route to use?
- KrisJordan 18y agoIn development mode, yes. We look at every controller and form a routing tree. In deployment mode that routing tree is serialized and cached. Only a single (matching) controller is then touched. Unserializing the data structure is extremely fast and finding a match is roughly an O(log n) operation.