by zxilly on 8/28/24, 3:15 PM with 13 comments
Which dependencies are eating up your binary size
Unexpected bloat from standard library or vendor packages
Size changes between binary versions with a visual diff
Key features that set it apart:
Interactive treemap visualizations (check out the demo: https://gsa.zxilly.dev)
Slick terminal UI for deep diving into package hierarchies
Cross-platform support (works on Linux, macOS, and Windows binaries)
Export to SVG for easy sharing and documentation or just visualize the CI process
Whether you're optimizing for edge devices, reducing Docker image sizes, or just curious about what's really inside your Go binaries, this tool provides detailed insights. .
by peterldowns on 8/29/24, 12:26 AM
(for the container image size analysis I used dive, available here https://github.com/wagoodman/dive)
by koito17 on 8/28/24, 6:25 PM
I love how the Kubernetes client for Go is always the culprit for adding dozens of megabytes to binary sizes. Thankfully, its impact on binary size is decreasing as the codebase adopts generics.
Out of curiosity, how well does this work with stripped binaries? Many people interested in reducing binary size will often strip debug symbols and add "-a -s" to LDFLAGS, so what identifying information of a package is left in a binary? Besides VCS information (unless the binary was also built with -buildvcs=false so Git commit hashes aren't baked into the binary).
by neonsunset on 8/28/24, 8:48 PM
On Windows, there's SizeBench[0] but it doesn't work on macOS and non-PE files, and I miss having a tool like that.
[0]: https://github.com/microsoft/SizeBench, likely used to be an internal tool that was open-sourced
by tslocum on 8/29/24, 12:04 AM
by JackYoustra on 8/29/24, 12:25 AM