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

Add option for concurrency of zipping packages #448

Closed
fredrik opened this issue Mar 14, 2023 · 0 comments
Closed

Add option for concurrency of zipping packages #448

fredrik opened this issue Mar 14, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@fredrik
Copy link
Contributor

fredrik commented Mar 14, 2023

Is your feature request related to a problem? Please describe.
For large projects with many functions, the packing stage can cause out-of-memory errors. This is due to the zipping of functions being done in parallel. (See https://github.com/floydspace/serverless-esbuild/blob/master/src/pack.ts#L174)

The problem is more likely to manifest with larger functions — the project I'm working ran into this issue when a new dependency caused the bundled function size to double.

Describe the solution you'd like
I'd like to limit the number of concurrent calls to zip in the package step using an optional configuration parameter.

Describe alternatives you've considered
Simply zipping one function (or a small pre-defined number of functions) at a time would also solve the problem, but might have other performance impacts.

@fredrik fredrik added the enhancement New feature or request label Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants