Please try https://github.com/Zxilly/go-size-analyzer . I created this 
based on reverse engineering, so only the bytes in the final build will be 
count.

在2024年6月18日星期二 UTC+8 01:14:09<Tony M> 写道:

> Are there other tools that may show the final size? I'd like to see if 
> there are more aggressive flags to strip unused code? It's a simple module, 
> with some grpc (protobuf), http . I don't believe all these code paths are 
> in scope for my 200 LOC
>
> On Friday, June 14, 2024 at 6:20:37 PM UTC-7 Dan Kortschak wrote:
>
>> On Fri, 2024-06-14 at 19:35 -0500, robert engels wrote: 
>> > Something doesn’t seem right... You state the total compiled size is 
>> > 22MB, but the first 3 entries combined are more than that. 
>>
>> It looks like goweight just gets the size of the .a files that are 
>> generated during the build and returns the sum of that for each of the 
>> dependencies. So it does not take into account the the linker's removal 
>> of unused things. 
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/ad94bcbd-6c44-4d31-84be-eecf72111860n%40googlegroups.com.

Reply via email to