4 ms·
I found go compiler isn't very efficient in not linking in the dead code. I ran into it by switching from aws-sdk-go to aws-sdk-go-v2 and the binary jumped from
by hrez 5y ago
I found go compiler isn't very efficient in not linking in the dead code.
I ran into it by switching from aws-sdk-go to aws-sdk-go-v2 and the binary jumped from 27Mb to 66Mb [1]
Granted fully featured app will likely use all of the module's code so it's not a factor.
[1] https://github.com/aws/aws-sdk-go-v2/discussions/1532 https://github.com/aws/aws-sdk-go-v2/discussions/1532
- jrockway 5y agoYeah, I have a feeling that these giant autogenerated clients are tough to optimize. Too many layers of indirection; even the compiler is confused and just crosses its fingers and hopes it doesn't have to investigate too much.