Skip to content

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

Merged
abernix merged 5 commits into
release-2.12.0from
pcarrier/treeBuilder_string
Mar 23, 2020
Merged

apollo-engine-reporting: direct path string building#3479
abernix merged 5 commits into
release-2.12.0from
pcarrier/treeBuilder_string

Conversation

@pcarrier

@pcarrier pcarrier commented Nov 6, 2019

Copy link
Copy Markdown
Contributor

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

@abernix abernix left a comment

Copy link
Copy Markdown
Member

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.

Comment thread packages/apollo-engine-reporting/src/treeBuilder.ts Outdated
Comment thread packages/apollo-engine-reporting/src/treeBuilder.ts Outdated
Comment thread packages/apollo-engine-reporting/src/treeBuilder.ts
} 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
Copy Markdown
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

abernix commented Nov 13, 2019

Copy link
Copy Markdown
Member

(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.

2 participants