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

Require apollo-engine-reporting only if EngineReportingAgent used. #2305

Merged
merged 1 commit into from
Feb 12, 2019

Conversation

benjamn
Copy link
Member

@benjamn benjamn commented Feb 12, 2019

When getEngineServiceId does not return a truthy value, we can save memory and startup time by avoiding importing apollo-engine-reporting, which (among its other dependencies) imports the protobuf.js implementation.

When getEngineServiceId does not return a truthy value, we can save memory
and startup time by avoiding importing apollo-engine-reporting, which
(among its other dependencies) imports the protobuf.js implementation.
@benjamn benjamn merged commit 543b9c8 into master Feb 12, 2019
@benjamn benjamn self-assigned this Feb 12, 2019
@abernix abernix deleted the import-engine-reporting-lazily branch February 19, 2019 14:38
abernix pushed a commit that referenced this pull request May 27, 2019
…#2324)

* lazy load unused lambda packages in core

* Style adjustments plus changes to account for other PRs with similar motives.

The work in #2054 was
designed in a way that, irregardless of the environment, the
`graphql-upload` package would only be loaded if uploads were enabled.
Therefore, the guard which checks `process.env.AWS_EXECUTION_ENV` should no
longer be necessary.

Additionally, we don't need to prefix our type-only variables with
underscores, as that's not a style that we've otherwise adopted.

* The work in this was mostly also implemented by #2305, #2304 and #2054, but the remaining subscriptions-transport-ws and unnecessary util.promisify imports are still super worth addressing. So, thank you!
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 22, 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