Merged
Conversation
The goal is to reduce layer sizes to optimize cold starts (that's the theory at least). - `strip` debug symbols for all libraries and PHP extensions (saves 11.7%) - compile PHP with the `-Os` C/CPP flag to optimize the binary for size (saves 8%) - compile libraries with the `-Os` flag (saves 6.3%) - disable the `soap` extension by default to avoid loading it on PHP startup (the only big unpopular extension I could find) - bundle the `pdo-mysql` extension in the PHP binary: it is extra small and will avoid loading it through an external file (small optimization) In total that's a 24% size reduction, i.e. 14.6MB. This is for Bref v3, I will run some benchmarks as just measuring the layer size doesn't tell us the full story about cold starts.
Contributor
This could probably be backported to bref 2 without any issues. |
Member
Author
|
Yes but there is some uncertainty on whether |
Contributor
|
Ah, good point. |
Contributor
Member
Author
|
I'll run some benchmarks and see if there is any noticeable change |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The goal is to reduce layer sizes to optimize cold starts (that's the theory at least).
stripdebug symbols for all libraries and PHP extensions (saves 11.7%)-OsC/CPP flag to optimize the binary for size (saves 8%)-Osflag (saves 6.3%)soapextension by default to avoid loading it on PHP startup (the only big unpopular extension I could find)pdo-mysqlextension in the PHP binary: it is extra small and will avoid loading it through an external file (small optimization)In total that's a 24% size reduction, i.e. 14.6MB.
This is for Bref v3, I will run some benchmarks as just measuring the layer size doesn't tell us the full story about cold starts.