Binary size too big with s3 packages #2930
Labels
feature-request
A feature should be added or improved.
p3
This is a minor priority issue
queued
This issues is on the AWS team's backlog
Acknowledgements
go get -u github.com/aws/aws-sdk-go-v2/...
)Describe the bug
When I add the s3 backend which uses the SDKv2 to rclone it increases the binary by 7.4 MiB and users have been complaining about the large binary sizes.
This makes the s3 backend by far the largest contributor to the rclone binary size (about 13%). Here are the top 11 backends ranked by size measured by commenting the backend out and compiling in release mode to check the binary sizes.
I compared this to the last version of rclone which used the SDKv1 and the s3 backend takes 6.9 MiB so this has got slightly worse. I expected this to get better with the modularization of the SDK :-(
Rclone uses the following sdk imports
According to the rather neat tool go-size-analyzer
The bulk of this in the service modules
Is there any way this can be improved?
Thank you
Regression Issue
Expected Behavior
I expected the S3 packages from the SDK to add no more than 1MB to my binary
Current Behavior
It adds 7.5 MB to my binary
Reproduction Steps
The test_backend_sizes.py script will compile rclone many times to measure backend sizes, and the go-size-analyzer tool can be used to verify it by running it on the rclone binary.
Possible Solution
No response
Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
go mod graph
as attachment as it is quite big.graph.txt
Compiler and Version used
go version go1.23.4 linux/amd64
Operating System and version
Ubuntu 22.04.5 LTS
The text was updated successfully, but these errors were encountered: