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

GCS - NPM dependencies #207

Closed
lazharichir opened this issue May 23, 2018 · 8 comments
Closed

GCS - NPM dependencies #207

lazharichir opened this issue May 23, 2018 · 8 comments
Assignees
Labels
api: storage Issues related to the googleapis/nodejs-storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@lazharichir
Copy link

lazharichir commented May 23, 2018

Using GCS in Google Cloud Functions, the number of dependencies matters hugely in order to improve cold starts. I use GCS for one short upload (logging) and it seems like it is hurting my cold start times as it has over a hundred dependencies in total.

+ @google-cloud/[email protected]
added 106 packages from 121 contributors in 7.289s

Are you folks caching your own packages for faster loading or not really?

@JustinBeckwith JustinBeckwith added priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Jun 1, 2018
@JustinBeckwith
Copy link
Contributor

This is something we're actively looking to fix. Most of those dependencies come in with request, so removing that is somewhat delicate work. We are actively working towards it though :)

@JustinBeckwith JustinBeckwith removed the priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. label Jun 1, 2018
@lazharichir
Copy link
Author

lazharichir commented Jun 1, 2018 via email

@JustinBeckwith
Copy link
Contributor

Yes! We've already moved a few core dependencies over, and it's gone quite well. It's just a lot of work is all.

@fhinkel
Copy link
Contributor

fhinkel commented Jun 14, 2018

Thanks for raising the issue. Closing this as duplicate of googleapis/nodejs-datastore#9

@fhinkel
Copy link
Contributor

fhinkel commented Aug 23, 2018

@JustinBeckwith , why did you re-open this?

@JustinBeckwith
Copy link
Contributor

We still have a dependency on request via gcs-resumable-upload. Can you post the results of a npm ls --production?

@JustinBeckwith
Copy link
Contributor

Also worth posting a trace using require-so-slow now and from the 1.x release.

@JustinBeckwith
Copy link
Contributor

This was fixed in #619 :) On master as of now:

@google-cloud/[email protected] /Users/beckwith/Code/nodejs-storage
├─┬ @google-cloud/[email protected]
│ ├── @google-cloud/[email protected]
│ ├── @google-cloud/[email protected]
│ ├─┬ @types/[email protected]
│ │ └── @types/[email protected]
│ ├─┬ @types/[email protected]
│ │ ├── @types/[email protected]
│ │ ├─┬ @types/[email protected]
│ │ │ └── @types/[email protected] deduped
│ │ ├── @types/[email protected] deduped
│ │ └── @types/[email protected]
│ ├── [email protected] deduped
│ ├── [email protected] deduped
│ ├── [email protected]
│ ├── [email protected] deduped
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected] deduped
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected] deduped
│ │ │ └─┬ [email protected]
│ │ │   └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected] deduped
│ │ │ ├─┬ [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ └── [email protected] deduped
│ │ │ ├── [email protected] deduped
│ │ │ ├── [email protected] deduped
│ │ │ └── [email protected] deduped
│ │ ├── [email protected] deduped
│ │ ├─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├─┬ [email protected]
│ │ │ │ │ └── [email protected] deduped
│ │ │ │ └── [email protected] deduped
│ │ │ └── [email protected] deduped
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ └─┬ [email protected]
│   └─┬ [email protected]
│     ├── [email protected] deduped
│     └── [email protected] deduped
├─┬ @google-cloud/[email protected]
│ ├── [email protected] deduped
│ ├── [email protected] deduped
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ └── [email protected] deduped
├── @google-cloud/[email protected]
├── [email protected]
├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected] deduped
│ │ ├─┬ [email protected]
│ │ │ └── [email protected] deduped
│ │ └── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├── [email protected] deduped
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected] deduped
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected] deduped
│ │ └── [email protected] deduped
│ └── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected] deduped
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ ├── [email protected] deduped
│ │ ├── [email protected] deduped
│ │ ├── [email protected] deduped
│ │ └── [email protected] deduped
│ ├── [email protected] deduped
│ ├── [email protected] deduped
│ └── [email protected] deduped
├─┬ [email protected]
│ └─┬ [email protected]
│   ├── [email protected] deduped
│   └── [email protected]
├── [email protected]
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├── [email protected] deduped
│ ├── [email protected] deduped
│ └─┬ [email protected]
│   ├── [email protected] deduped
│   └── [email protected] deduped
├── [email protected]
├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └─┬ [email protected]
│ │ │   └── [email protected]
│ │ └─┬ [email protected]
│ │   └── [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └── [email protected] deduped
└── [email protected]

@google-cloud-label-sync google-cloud-label-sync bot added the api: storage Issues related to the googleapis/nodejs-storage API. label Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/nodejs-storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

4 participants