[wp-trac] [WordPress Trac] #43874: REST API: Only render fields specific to request when _fields= is used
WordPress Trac
noreply at wordpress.org
Wed May 2 01:25:26 UTC 2018
#43874: REST API: Only render fields specific to request when _fields= is used
---------------------------------------------+-----------------------------
Reporter: danielbachhuber | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.9.7
Component: REST API | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests commit | Focuses: rest-api,
| performance
---------------------------------------------+-----------------------------
Comment (by pento):
@danielbachhuber: Nice work! As this is a large patch, I've committed it
to `trunk` now, to avoid letting it get stale.
I think we'll also need to consider how to filter meta fields before
they're retrieved from the database, too: if you have a lot of meta fields
registered, it can be a fairly substantial performance drag.
Also, I would be totally okay with `get_metadata()` (and the related
`get_*_meta()` functions) accepting an array for `$meta_key`, so data can
be retrieved in one query, instead of hundreds.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43874#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list