Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Routing optimization
  • I'm trying to look through the routing code to better understand it, so forgive me if I'm missing something stupid here, but it appears that it loops through all the entries to find a URI match. Could there be an initial check to see if the URI is a key in the array before looping through to find a regex match. I think this would greatly increase the execution time it takes when the routes array starts to get large. I mean something along these lines: if (isset ($routes[$uri])
    {
    // found a match!
    }
    else
    {
    // loop through entire array
    }
  • Please add this as a feature request at https://github.com/fuel/core/issues, so it won't be forgotten.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion