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

Trim installer size #44

Open
petewilcock opened this issue Jun 6, 2021 · 4 comments
Open

Trim installer size #44

petewilcock opened this issue Jun 6, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@petewilcock
Copy link

The build artifact from composer build is hefty at over 3mb. On inspection it seems that the vendor directory has a lot in there. Is it all essential - is there any way to trim this down? Apologies, composer is not my forté.

@leonstafford
Copy link
Contributor

Hi @petewilcock,

This is down to the AWS SDK used here. It annoyed me enough years ago to write my own S3 and CloudFront code, but we lose a lot of advantages and introduce more errors doing that, unfortunately.

We could still trim down a custom fork of the AWS SDK, but I'd rather write/find a library that does that repeatedly vs once off.

There's a chance if you're just composer installing, then you're getting dev dependencies, too. There's a build script in tools directory for generating zip installers, I think you can see an example composer command in there for gathering only production files, but your few MB sounds like that already. With all dev dependencies, I think it'd be much bigger.

On mobile now, so not able to confirm, sorry.

Specific need for smaller size? Share the use case and I may have some ideas to solve.

@petewilcock
Copy link
Author

Howdy @leonstafford - I did try a composer install/build --no-dev but this has had no impact on built size. I do remember this being an issue with other work where the AWS SDK was needed and the full install is massive.

No burning need - I'm just about to launch my long-awaited terraform module that wraps all this together and the s3 zip is the largest asset. 3mb isn't the end of the world though so don't assign it highest priority :)

@leonstafford
Copy link
Contributor

Very excited to see the TF stuff! Please ping me when ready and I'll spread the word!

@petewilcock
Copy link
Author

petewilcock commented Jun 6, 2021 via email

@john-shaffer john-shaffer added the enhancement New feature or request label Oct 10, 2021
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

3 participants