Re: [go-nuts] strip / reduce module compile size

2024-06-18 Thread Zxilly Chou
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 写道: > Are there other tools that may show the final size? I'd like to see if > there are more aggressive flags

Re: [go-nuts] strip / reduce module compile size

2024-06-17 Thread 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

Re: [go-nuts] strip / reduce module compile size

2024-06-14 Thread 'Dan Kortschak' via golang-nuts
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

Re: [go-nuts] strip / reduce module compile size

2024-06-14 Thread robert engels
Something doesn’t seem right... You state the total compiled size is 22MB, but the first 3 entries combined are more than that. > On Jun 14, 2024, at 4:43 PM, Tony M wrote: > > Thank you to github.com/jondot/goweight I was able to determine the compiled > module sizes (below). Heavy hitters ar

[go-nuts] strip / reduce module compile size

2024-06-14 Thread Tony M
Thank you to github.com/jondot/goweight I was able to determine the compiled module sizes (below). Heavy hitters are net/http & protobufs, among 100+ others . Total compile size is 22MB . Are there any tools or flags that can help strip or reduce some of the compiled code from these modules?