[wp-trac] [WordPress Trac] #48530: Match REST API route by namespace before performing regex checks

WordPress Trac noreply at wordpress.org
Thu Nov 7 18:42:14 UTC 2019


#48530: Match REST API route by namespace before performing regex checks
-------------------------------+-----------------------------
 Reporter:  TimothyBlynJacobs  |      Owner:  (none)
     Type:  enhancement        |     Status:  assigned
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  REST API           |    Version:  4.4
 Severity:  normal             |   Keywords:
  Focuses:  performance        |
-------------------------------+-----------------------------
 Right now, in order to match a request to a specific route handler, we
 iterate over every route and perform a regex check.

 Whenever a route is registered, you must specify a namespace. If we first
 checked the namespaces for a match, we'd be able to eliminate whole groups
 of routes from the regex check.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48530>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list