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

Optimize package for lambda #17

Open
1 of 3 tasks
mledom opened this issue Jun 4, 2019 · 6 comments
Open
1 of 3 tasks

Optimize package for lambda #17

mledom opened this issue Jun 4, 2019 · 6 comments
Labels
discussion 🌮 help wanted Extra attention is needed

Comments

@mledom
Copy link

mledom commented Jun 4, 2019

I'm submitting a ...

  • bug report
  • [] feature request
  • question about the decisions made in the repository
  • question about how to use this project

Summary

We are using the module for our lambda functions and the size of the package when deployed is over 42Mb. Are there some dependencies that could be move to dev depends and minimized code?

Other information

Running node 10.10 in AWS Lambda

@kritzware
Copy link
Contributor

Hi @mledom , thanks for reporting this! This is an issue we're aware of, from our own usage with Netlify Functions (internally Lambda).

I'm going to dedicate a bit of time to look into this, and see if there is any optimisation we can do to lower the package size. I'll keep you updated 👍

@kritzware kritzware added the help wanted Extra attention is needed label Jun 5, 2019
@kritzware
Copy link
Contributor

Hi @mledom , I've just merged in #18, which adds minification of the compiled protos directory. The details can be found in the PR writeup. Subsequently, we've released a new google-ads-node version, 1.12.1.

This is a good first step and brings down the package size significantly, but we think there is more we can do to bring the overall package size down. Stay tuned for more 👍

@kritzware
Copy link
Contributor

An update on this: we've had some ideas on how we might be able to further reduce the package size, ranging from releasing a "google-ads-node-lite" (think of an alpine release), to compiling protos on the fly.

I'll make sure to keep this issue updated when we decide on our next steps.

@Zikoel
Copy link

Zikoel commented Mar 9, 2021

Hi @kritzware what do you mean with compiling protos on the fly ?

@sweetanalytics
Copy link

@kritzware any progress or ideas on bringing the package size down? It looks like the bulk of it sits inside src and the large number of files in both v7 and v8. Protos folder is also quite large, but not comparable to the other two. Maybe a toned down version of the library (lite) or a way for developers to pick and choose which modules they install/use would be an interesting solution.

Screen Shot 2022-01-18 at 16 00 50

@hsource
Copy link

hsource commented Oct 13, 2022

@sweetanalytics See #99 for a solution - this is a problem with the upstream proto builder Google uses. I recommend using another proto builder and gRPC library on top of those protos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion 🌮 help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants