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

apollo-engine-reporting: direct path string building #3479

Merged
merged 5 commits into from
Mar 23, 2020

Conversation

pcarrier
Copy link
Contributor

@pcarrier pcarrier commented Nov 6, 2019

I don't have performance numbers, but creating those arrays and reversing them could be worth avoiding.

@pcarrier pcarrier changed the title apollo-engine-reporting: avoid building arrays in hot path apollo-engine-reporting: direct path string building Nov 7, 2019
Copy link
Member

@abernix abernix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I'm certain this would be more efficient.

I've left a couple comments within. This needs a - apollo-engine-reporting: CHANGELOG.md entry (which we'll add before merging if you don't have one in mind) and my only other firm ask is that we add the comment in-line for posterity's sake.

packages/apollo-engine-reporting/src/treeBuilder.ts Outdated Show resolved Hide resolved
packages/apollo-engine-reporting/src/treeBuilder.ts Outdated Show resolved Hide resolved
} from 'graphql';
import { Trace, google } from 'apollo-engine-reporting-protobuf';
import { GraphQLError, GraphQLResolveInfo, ResponsePath } from 'graphql';
import { google, Trace } from 'apollo-engine-reporting-protobuf';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strongly prefer keeping these no-op, one-off changes out of change sets, but not asking you to revert it.

@abernix
Copy link
Member

abernix commented Nov 13, 2019

(I low-key wish there were __tests__ for this treeBuilder.ts already prior to this change, but alas, there are not.)

@abernix abernix changed the base branch from master to release-2.12.0 March 23, 2020 12:43
@abernix abernix added this to the Release 2.12.0 milestone Mar 23, 2020
@abernix abernix merged commit 9d3f04e into release-2.12.0 Mar 23, 2020
@abernix abernix deleted the pcarrier/treeBuilder_string branch March 23, 2020 12:44
abernix added a commit that referenced this pull request Mar 23, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants