Skip to content

Data: Consider optimizing aggregate of _fields requests #15114

Closed

Description

@aduth

Previously: #12930

In an assumed scenario where two data consumers each fetch an entity (or entity set) while providing _fields, it should be considered whether previous requests could be used to satisfy the requirements.

For example, the following should only require a single network request:

wp.data.select( 'core' ).getEntityRecords( 'postType', 'post', { _fields: [ 'title', 'content' ] } );
wp.data.select( 'core' ).getEntityRecords( 'postType', 'post', { _fields: [ 'title' ] } );

Related:

Activity

  1. added
    [Type] Enhancement
    [Type] Performance
    [Package] Core data
    on Apr 22, 2019
  2. added
    REST API Interaction
    on Dec 8, 2019
  3. added
    [Status] In Progress
    on Jan 7, 2020
  4. removed their assignment
    on May 25, 2020
  5. removed
    [Status] In Progress
    on May 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    REST API Interaction[Package] Core data[Type] Enhancement[Type] Performance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions