Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize attributegroup read request by eliminating array_d/array and listing columns #932

Open
RFSH opened this issue Jan 25, 2022 · 1 comment
Assignees
Labels
investigation required Requires some initial investigation

Comments

@RFSH
Copy link
Member

RFSH commented Jan 25, 2022

When an all-outbound path's value is needed for a page (either by being visible, or being used in the wait_for list of another column) we're modifying the main entity request into an attributegroup request which includes the data for this path as well. For this attributegroup request, we need to provide a projection list of rows/data that we want to get from ermrest. For all-outbounds we ask for the whole row of data by doing array_d(F:*).

As part of #931, we optimized this logic by making sure we're only asking for scalar column values when an all-outbound scalar value is used and doesn't require the whole row of data. Doing so makes the request more performant by making sure we're not asking for data that we don't need.

Now we should see if we can optimize other parts of the url that are using array_d/array and asking for the whole row, which means:

  • The array_d(M:*) added for fetching all the columns of the main entity.
  • The array_d(F:*) added for all-outbound columns.

One suggestion is using the "columns" that are defined in the source-definitions to figure out the list of columns that we should get the data for. If it's not true, then we can assume that the listed columns is all the data that data-modelers need.

This logic should work properly for any all-outbound projection that we're adding, but might not be enough for the main entity projection. Currently to figure out the list of all-outbounds that we need to fetch we're not just looking at the fkeys. We're fetching data for all the all-outbounds that are visible or part of a wait_for of a column.

Also columns and fkeys are supposed to be used for backwards compatibility and only related to templating environment. Expanding their usage would cause some unexpected behavior as this will affect the column-display or any other display related annotation as well (given that the whole row of data might not be available anymore).

This requires more thought, I should list all the changes required as well as wether this is even feasible. I should list where we expect the whole row and whether we can relax this in some cases or not.

@RFSH RFSH self-assigned this Jan 25, 2022
@karlcz
Copy link
Contributor

karlcz commented Jan 25, 2022 via email

@RFSH RFSH changed the title Optimize attributegroup read request by eliminating array_d(M:*) projection Optimize attributegroup read request by eliminating array_d/array and listing columns Jan 26, 2022
@RFSH RFSH removed the enhancement label Apr 11, 2022
@jrchudy jrchudy added the investigation required Requires some initial investigation label Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigation required Requires some initial investigation
Projects
None yet
Development

No branches or pull requests

3 participants