This repository was archived by the owner on Apr 5, 2025. It is now read-only.
feat(python): optimize Python layer by always building wheels #10
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.
Always build wheels for Python layer. This results into a bigger layer, but data shows it to be faster on coldstart.
Load tests results
Optimized == CFLAGS="-Os -g0 -s", with wheels (C extensions) == bigger package
Unoptimized == pure python == smaller package
ARM64, 128MB, Empty handler
Optimized layer:
[{"coldStart":1,"count":147,"p50":111.904,"p90":125.4095,"p99":142.0987,"max":150.04}]
Unoptimized layer:
[{"coldStart":1,"count":151,"p50":111.1238,"p90":125.7861,"p99":146.8638,"max":149.75}]
ARM64, 128MB, importing Parser and Logging
Optimized layer:
[{"coldStart":1,"count":119,"p50":446.2816,"p90":466.3461,"p99":489.7542,"max":493.14}]
Unoptimized layer:
[{"coldStart":1,"count":105,"p50":481.5028,"p90":505.6717,"p99":533.1811,"max":567.93}]
X86_64, 128MB, Importing Parser and Logging
Optimized layer:
[{"coldStart":1,"count":108,"p50":469.1512,"p90":494.6738,"p99":571.8211,"max":572.25}]
Unoptimized layer:
[{"coldStart":1,"count":166,"p50":502.6482,"p90":541.7763,"p99":642.7576,"max":679.75}]