[wp-trac] [WordPress Trac] #63946: Introduce a mechanism for lazy-loading REST routes and handlers
WordPress Trac
noreply at wordpress.org
Mon Sep 8 20:41:39 UTC 2025
#63946: Introduce a mechanism for lazy-loading REST routes and handlers
-------------------------+------------------------------
Reporter: prettyboymp | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version:
Severity: normal | Resolution:
Keywords: | Focuses: performance
-------------------------+------------------------------
Comment (by prettyboymp):
After some further digging, I noticed that the
`WP_REST_Server::get_target_hints_for_link()`, which attempts to match
internal links to handlers also degrades quite a bit as new route handlers
are added.
The default `/wp-json/wp/v2/posts` endpoint ends up calling running this
for every post returned in the collection.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63946#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list