You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The pages list in the Site Editor — and the experimental posts list — currently fetch entire entity records, including fields that aren't used in the current view. As we add more fields — especially ones that are computationally expensive or require additional queries — this results in more data being fetched "just in case."
Let's try to optimize these listings so that only the data needed for the current view is loaded by leveraging the _fields and _embed parameters from the REST API.
Add REST API _field and _embed dependencies to the Field type definition.
Most common fields (like slug, status, date) map directly to REST API fields. But complex DataViews fields might depend on multiple _fields and _embed parameters.
Implement a mechanism to resolve a group of field/embed dependencies into the appropriate query parameters.
Investigate cross-endpoint dependencies that cannot be resolved with _embeds (e.g., a post-related Field that needs data from a non-post endpoint).
With the changes above, we would make a request every time the view changes. For example, if we added Field C to a DataView with columns A and B, there would be a request with _fields=A,B,C, which avoids fetching many unnecessary fields and improves load performance. If core-data supported partial caching, the resolver could request C and reuse the cached A and B fields.
The pages list in the Site Editor — and the experimental posts list — currently fetch entire entity records, including fields that aren't used in the current view. As we add more fields — especially ones that are computationally expensive or require additional queries — this results in more data being fetched "just in case."
Let's try to optimize these listings so that only the data needed for the current view is loaded by leveraging the
_fieldsand_embedparameters from the REST API._fieldsis present in the query #70738_fieldand_embeddependencies to theFieldtype definition.slug,status,date) map directly to REST API fields. But complex DataViews fields might depend on multiple_fieldsand_embedparameters.core-datato resolve partial records and cache individual fields. (Field-level resolution in core data #26629)Cto a DataView with columnsAandB, there would be a request with_fields=A,B,C, which avoids fetching many unnecessary fields and improves load performance. Ifcore-datasupported partial caching, the resolver could requestCand reuse the cachedAandBfields.