QP execution: avoid redundant entity responses from aliased operations#9122
Open
duckki wants to merge 1 commit intoduckki/fed-897from
Open
QP execution: avoid redundant entity responses from aliased operations#9122duckki wants to merge 1 commit intoduckki/fed-897from
duckki wants to merge 1 commit intoduckki/fed-897from
Conversation
…r context When contexts differ across entities, the aliased _entities query previously shared a single $representations array across all aliases, producing an N×M response matrix where only N values were needed. This change gives each _entities_<i> alias its own singleton $representations_<i> variable containing only the one representation needed for that context, reducing subgraph response size from N×M to N. Also optimizes aliased error remapping by pre-building a context-to-path HashMap for O(1) lookups instead of linear scans.
Contributor
✅ Docs preview readyThe preview is ready to be viewed. View the preview File Changes 0 new, 2 changed, 0 removedBuild ID: d3add78272e910fbb74b6554 URL: https://www.apollographql.com/docs/deploy-preview/d3add78272e910fbb74b6554 ✅ AI Style Review — No Changes DetectedNo MDX files were changed in this pull request. Review Log: View detailed log
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(This is an add-on optimization on top of PR #9071.)
Eliminate redundant entity responses by splitting $representations per context
When contexts differ across entities, the aliased _entities query
previously shared a single $representations array across all aliases,
producing an N×M response matrix where only N values were needed.
This change gives each
_entities_<i>alias its own singleton$representations_<i>variable containing only the one representationneeded for that context, reducing subgraph response size from N×M to N.
Also optimizes aliased error remapping by pre-building a
context-to-path HashMap for O(1) lookups instead of linear scans.
Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.