aws / aws-lambda-nodejs-runtime-interface-client

Apache License 2.0
180 stars 56 forks source link

Rebuilding on any package install #35

Open thdxr opened 2 years ago

thdxr commented 2 years ago

I think the current scripts are too aggressive with rebuilding this library. If I have this package as a dependency, any time I add any other package I have to sit through it recompiling, which can take minutes.

We're looking to bundle this package in https://github.com/serverless-stack/serverless-stack and we don't want our users to be impacted in this way.

Any suggestions?

carlzogh commented 2 years ago

I think our next step should be to look into distributing pre-compiled binaries as part of the RIC's release to remove some of the responsibilities (eg. compiling and build-time dependencies) from consumers. This would help also greatly reduce time spent installing the package as reported in this issue.

thdxr commented 2 years ago

That would be great. Although I recently figured out that MacOS isn't supported and that doesn't work for our use case. At quick glance it doesn't seem like anything is particularly difficult about compiling it on Mac but not sure

lughino commented 1 year ago

Revamping this issue 1 year after.. Do you have any updates? It's very annoying to have to recompile everytime. Our docker build is taking a good 150 seconds more every time as it seems docker doesn't cache the step.

derekmurawsky commented 3 months ago

We are building on a macbook m1 and the build time was 900 seconds. Reducing build times / increasing cache-ability in any way would be extremely beneficial.