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

Minify compiled proto files (#17) #18

Merged
merged 2 commits into from
Jun 6, 2019
Merged

Minify compiled proto files (#17) #18

merged 2 commits into from
Jun 6, 2019

Conversation

kritzware
Copy link
Contributor

@kritzware kritzware commented Jun 5, 2019

  • What kind of change does this PR introduce?
    Minor dependency upgrades and a new task for minifying the compiled proto files. See Optimize package for lambda #17 for the conversation reference.
  • What is the current behavior?
    Currently, this library is very large when compiled for NPM deployment. This becomes problematic when using it with serverless environments, such as AWS Lambda or Netlify Functions.
  • What is the new behavior (if this is a feature change)?
    I've included a new Make task minify, which compresses the compiled protocol buffer files down. There were also many empty files from the protoc compilation step that weren't required, so they've been deleted as well. The package size is still quite large because of all the compiled protos, but this is a good first step in reducing the overall size.
  • Other information:
    This table shows the size savings with this PR:
Module Before Comp. Before After Comp. After % Saving
NPM package (npm pack) 2.3Mb 35.5Mb 1.4Mb 16.5Mb 73%
Compiled proto dir n/a 36.9Mb n/a 15.5Mb 81.68%

@kritzware kritzware added the enhancement New feature or request label Jun 5, 2019
@kritzware kritzware changed the title Reduce package size (#17) Minify compiled proto files (#17) Jun 5, 2019
@kritzware kritzware requested a review from avermeil June 6, 2019 09:49
@kritzware kritzware merged commit ac5edd8 into master Jun 6, 2019
@kritzware kritzware mentioned this pull request Jun 6, 2019
3 tasks
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

Successfully merging this pull request may close these issues.

2 participants