Edwin Cromley
Edwin Cromley
> 👍 I dig the idea. What are next steps?
> Can you share your proposed output for the routes? I would have to think a bit about it first. I can make a gist.
https://gist.github.com/BE-Webdesign/42df5e6117659b7bb8b5066ab4f1c90a This would be a rough thing, I guess. It's not the full picture.
> Ideally, it'd be functional code. What do you think about scaffolding individual routes instead, with command arguments for each of the features that register_rest_route() supports? That would probably be...
> Do you think it will ever post a problem to have the schema cached? e.g. what happens if a field is registered after the schema is cached? The tests...
By looking for the schema property if you were doing internal requests for the same endpoint with wildly different request arguments, for instance in batch processing, you would get the...
When we have support for batch queries we can add in a conditional to prevent the "caching" of the schema property. On batch queries you will hit the same controller...
Yeah I just profiled this too, something wrong is going on. For a regular `GET` Request to posts `get_item_schema()` was called 46 times. When you add more items to the...
> We can cache the schema as an object property, but it doesn't appear that we need to. I'm also only seeing get_item_schema called 500 times on a page with...
I set this up with Blackfire and it shows pretty much the same stuff as the Xdebug profiler; same thing goes for XHProf. It could be the server I test...