Skip to content

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

Merged
benjamn merged 1 commit into
masterfrom
import-engine-reporting-lazily
Feb 12, 2019
Merged

Require apollo-engine-reporting only if EngineReportingAgent used.#2305
benjamn merged 1 commit into
masterfrom
import-engine-reporting-lazily

Conversation

@benjamn

@benjamn benjamn commented Feb 12, 2019

Copy link
Copy Markdown
Member

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